From cd820569dc9995ce8c19a45fd87658c046185e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kimmo=20Lepp=C3=A4l=C3=A4?= Date: Mon, 20 Jan 2014 15:38:17 +0200 Subject: [PATCH] Fix KDE calculated colors being all black MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit KDE calculated colors weren't set correctly rendering all calculated colors "Light", "Midlight", "Mid" and "Dark" as black. Issues fixed: * QFrame with frameStyle Box|Raised didn't look raised but instead just black border. * QMdiArea had black background * QToolBox separators were just black Change-Id: I5e06bafe280f73af12f23960ae68a8b35e8549ac Reviewed-by: Rafael Roquetto Reviewed-by: Jens Bache-Wiig Reviewed-by: J-P Nurmi Reviewed-by: Kimmo Leppälä --- .../themes/genericunix/qgenericunixthemes.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp index ee295afe6c..f44d53a00e 100644 --- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp +++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp @@ -317,19 +317,23 @@ void QKdeThemePrivate::readKdeSystemPalette(const QSettings &kdeSettings, QPalet const QBrush buttonBrushDark = QBrush(button.darker(v > 128 ? 200 : 50)); const QBrush buttonBrushDark150 = QBrush(button.darker(v > 128 ? 150 : 75)); const QBrush buttonBrushLight150 = QBrush(button.lighter(v > 128 ? 150 : 75)); + const QBrush buttonBrushLight = QBrush(button.lighter(v > 128 ? 200 : 50)); pal->setBrush(QPalette::Disabled, QPalette::WindowText, buttonBrushDark); pal->setBrush(QPalette::Disabled, QPalette::ButtonText, buttonBrushDark); pal->setBrush(QPalette::Disabled, QPalette::Button, buttonBrush); - pal->setBrush(QPalette::Disabled, QPalette::Light, buttonBrushLight150); - pal->setBrush(QPalette::Disabled, QPalette::Dark, buttonBrushDark); - pal->setBrush(QPalette::Disabled, QPalette::Mid, buttonBrushDark150); pal->setBrush(QPalette::Disabled, QPalette::Text, buttonBrushDark); pal->setBrush(QPalette::Disabled, QPalette::BrightText, whiteBrush); pal->setBrush(QPalette::Disabled, QPalette::Base, buttonBrush); pal->setBrush(QPalette::Disabled, QPalette::Window, buttonBrush); pal->setBrush(QPalette::Disabled, QPalette::Highlight, buttonBrushDark150); pal->setBrush(QPalette::Disabled, QPalette::HighlightedText, buttonBrushLight150); + + // set calculated colors for all groups + pal->setBrush(QPalette::Light, buttonBrushLight); + pal->setBrush(QPalette::Midlight, buttonBrushLight150); + pal->setBrush(QPalette::Mid, buttonBrushDark150); + pal->setBrush(QPalette::Dark, buttonBrushDark); } /*!