summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_x11.cpp
diff options
context:
space:
mode:
authorJeremy Whiting <jeremy@scitools.com>2009-07-17 12:29:39 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-07-17 12:34:06 (GMT)
commit538cbb4f5b638cdfa2fff2576a723457a2c889c6 (patch)
treeffdbe2c89548bbab28426e288040203ae950dbb1 /src/gui/kernel/qapplication_x11.cpp
parent8038173382933ead65631c2f8f78f46c066f66ee (diff)
downloadQt-538cbb4f5b638cdfa2fff2576a723457a2c889c6.zip
Qt-538cbb4f5b638cdfa2fff2576a723457a2c889c6.tar.gz
Qt-538cbb4f5b638cdfa2fff2576a723457a2c889c6.tar.bz2
Add reading of kde colors Link and LinkVisited colors from qt apps in qapplication_x11.cpp
so these two colors don't get overridden by the defaults when kde config is found. Merge-request: 917 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
Diffstat (limited to 'src/gui/kernel/qapplication_x11.cpp')
-rw-r--r--src/gui/kernel/qapplication_x11.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index cc41299..77e29a6 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -1396,6 +1396,18 @@ static void qt_set_x11_resources(const char* font = 0, const char* fg = 0,
color = kdeColor(QLatin1String("Colors:Button/ForegroundNormal"), theKdeSettings);
if (color.isValid())
pal.setColor(QPalette::ButtonText, color);
+
+ color = kdeColor(QLatin1String("linkColor"), theKdeSettings);
+ if (!color.isValid())
+ color = kdeColor(QLatin1String("Colors:View/ForegroundLink"), theKdeSettings);
+ if (color.isValid())
+ pal.setColor(QPalette::Link, color);
+
+ color = kdeColor(QLatin1String("visitedLinkColor"), theKdeSettings);
+ if (!color.isValid())
+ color = kdeColor(QLatin1String("Colors:View/ForegroundVisited"), theKdeSettings);
+ if (color.isValid())
+ pal.setColor(QPalette::LinkVisited, color);
}
if (highlight.isValid() && highlightText.isValid()) {