summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
authorKimmo Leppälä <kimmo.leppala@digia.com>2014-01-20 15:38:17 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-04 16:01:26 +0100
commitcd820569dc9995ce8c19a45fd87658c046185e63 (patch)
tree73c75a5b54220df19b07f889edf12cde503ef234 /src/platformsupport
parent49f30168c0d57f6af90ca90328aa575a305dae68 (diff)
Fix KDE calculated colors being all black
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 <rafael.roquetto@kdab.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Kimmo Leppälä <kimmo.leppala@digia.com>
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/themes/genericunix/qgenericunixthemes.cpp10
1 files 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);
}
/*!