[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeutils/kcalc
From:       Christoph Feck <christoph () maxiom ! de>
Date:       2010-08-28 13:41:08
Message-ID: 20100828134108.80BC4AC86C () svn ! kde ! org
[Download RAW message or body]

SVN commit 1169124 by cfeck:

Do not apply style sheets when using default button colors

Qt cannot handle style sheets with a changed palette on "pixmap based"
styles, and falls back to the "Windows" style.

To work around styles' limitation, we only set the style sheet if any
of the colors has been customized. This ensures all buttons get a
consistent frame even if only one of the colors has been changed.

If you still see this bug, remove .kcalcrc

BUG: 237513
FIXED-IN: 4.6.0


 M  +11 -0     kcalc.cpp  


--- trunk/KDE/kdeutils/kcalc/kcalc.cpp #1169123:1169124
@@ -1751,6 +1751,17 @@
 {
     calc_display->changeSettings();
 
+    KColorScheme schemeButtons(QPalette::Active, KColorScheme::Button);
+    QColor defaultColor = schemeButtons.background().color();
+    if (KCalcSettings::numberButtonsColor() == defaultColor
+        && KCalcSettings::functionButtonsColor() == defaultColor
+        && KCalcSettings::statButtonsColor() == defaultColor
+        && KCalcSettings::hexButtonsColor() == defaultColor
+        && KCalcSettings::memoryButtonsColor() == defaultColor
+        && KCalcSettings::operationButtonsColor() == defaultColor) {
+        return;
+    }
+
     QString sheet = "KPushButton { background-color: %1 }";
 
     QColor numPal(KCalcSettings::numberButtonsColor());
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic