[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: RE: KDE/kdelibs/kdeui/colors
From: "Matthew Woehlke" <mwoehlke () tibco ! com>
Date: 2007-09-14 22:37:23
Message-ID: E4B46A50CCA52348A67B3506C79BB390DCA3FC () NA-PA-VBE01 ! na ! tibco ! com
[Download RAW message or body]
I OK'd changing the defaults, which would have been a one-line change
(two if you really care about setting _amount[1] to 0.0), not gutting
the StateEffects ctor. All you've done by reapplying this is make it
impossible to configure the built-in defaults sanely.
--
Matthew
-----Original Message-----
From: Thomas Zander [mailto:zander@kde.org]
Sent: Friday, September 14, 2007 17:23
To: kde-commits@kde.org
Cc: kde-core-devel@kde.org
Subject: KDE/kdelibs/kdeui/colors
SVN commit 712618 by zander:
recommit; please don't revert again. If you have a problem, talk first.
Its actually very rude to revert a commit you already Ok-ed in concept
on IRC without saying a word to me about it.
CCMAIL: kde-core-devel@kde.org
M +21 -32 kcolorscheme.cpp
--- trunk/KDE/kdelibs/kdeui/colors/kcolorscheme.cpp #712617:712618 @@
-69,39 +69,28 @@ StateEffects::StateEffects(QPalette::ColorGroup state,
const KSharedConfigPtr &config)
: _color(0,0,0,0)//, _chain(0) not needed yet {
- switch (state) {
- case QPalette::Disabled:
- {
- KConfigGroup cfg(config, "ColorEffects:Disabled");
- _effects[Intensity] = cfg.readEntry( "IntensityEffect",
(int)IntensityNoEffect );
- _effects[Color] = cfg.readEntry( "ColorEffect",
(int)ColorNoEffect );
- _effects[Contrast] = cfg.readEntry( "ContrastEffect",
(int)ContrastFade );
- _amount[Intensity] = cfg.readEntry( "IntensityAmount",
+0.0 );
- _amount[Color] = cfg.readEntry( "ColorAmount",
+0.0 );
- _amount[Contrast] = cfg.readEntry( "ContrastAmount",
+0.7 );
- if (_effects[0] >= ColorFade) {
- _color = cfg.readEntry( "Color", QColor(128,128,128) );
- }
- } break;
- // TODO (Inactive+Disabled) - create chain and fall through
- case QPalette::Inactive:
- {
- KConfigGroup cfg(config, "ColorEffects:Inactive");
- _effects[Intensity] = cfg.readEntry( "IntensityEffect",
(int)IntensityNoEffect );
- _effects[Color] = cfg.readEntry( "ColorEffect",
(int)ColorNoEffect );
- _effects[Contrast] = cfg.readEntry( "ContrastEffect",
(int)ContrastFade );
- _amount[Intensity] = cfg.readEntry( "IntensityAmount",
+0.0 );
- _amount[Color] = cfg.readEntry( "ColorAmount",
+0.0 );
- _amount[Contrast] = cfg.readEntry( "ContrastAmount",
+0.4 );
- if (_effects[Color] >= ColorFade) {
- _color = cfg.readEntry( "Color", QColor(128,128,128) );
- }
- } break;
- default:
- _effects[0] = 0;
- _effects[1] = 0;
- _effects[2] = 0;
+ QString group;
+ if(state == QPalette::Disabled)
+ group = "ColorEffects:Disabled";
+ else if(state == QPalette::Inactive)
+ group = "ColorEffects:Inactive";
+ else {
+ _effects[0] = 0;
+ _effects[1] = 0;
+ _effects[2] = 0;
}
+
+ if(! group.isEmpty()) {
+ KConfigGroup cfg(config, group);
+ _effects[Intensity] = cfg.readEntry( "IntensityEffect",
(int)IntensityNoEffect );
+ _effects[Color] = cfg.readEntry( "ColorEffect",
(int)ColorNoEffect );
+ _effects[Contrast] = cfg.readEntry( "ContrastEffect",
(int)ContrastFade );
+ _amount[Intensity] = cfg.readEntry( "IntensityAmount", 0.0 );
+ _amount[Color] = cfg.readEntry( "ColorAmount", 0.0 );
+ _amount[Contrast] = cfg.readEntry( "ContrastAmount", 0.7 );
+ if (_effects[0] >= ColorFade)
+ _color = cfg.readEntry( "Color", QColor(128, 128, 128) );
+ }
}
QBrush StateEffects::brush(const QBrush &background) const
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic