From 538cbb4f5b638cdfa2fff2576a723457a2c889c6 Mon Sep 17 00:00:00 2001 From: Jeremy Whiting Date: Fri, 17 Jul 2009 14:29:39 +0200 Subject: 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 --- src/gui/kernel/qapplication_x11.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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()) { -- cgit v0.12