From cef60f90cb5ad55d58a4f9774520f7b8ad1032c8 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Wed, 14 Oct 2009 02:55:40 +0000 Subject: [PATCH] removed useless colorCacheInvalid_ member svn path=/trunk/KDE/kdebase/workspace/; revision=1034964 --- clients/oxygen/oxygenbutton.cpp | 4 +--- clients/oxygen/oxygenbutton.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/clients/oxygen/oxygenbutton.cpp b/clients/oxygen/oxygenbutton.cpp index 4c5913a3ee..917975b78b 100644 --- a/clients/oxygen/oxygenbutton.cpp +++ b/clients/oxygen/oxygenbutton.cpp @@ -48,7 +48,6 @@ namespace Oxygen client_(parent), helper_( parent.helper() ), type_(type), - colorCacheInvalid_(true), timeLine_( 200, this ) { setAutoFillBackground(false); @@ -93,14 +92,13 @@ namespace Oxygen if( active ) return palette.color(QPalette::Active, QPalette::ButtonText); else { - if (colorCacheInvalid_) + if( !cachedButtonDetailColor_.isValid() ) { QColor ab = palette.color(QPalette::Active, QPalette::Button); QColor af = palette.color(QPalette::Active, QPalette::ButtonText); QColor nb = palette.color(QPalette::Inactive, QPalette::Button); QColor nf = palette.color(QPalette::Inactive, QPalette::ButtonText); - colorCacheInvalid_ = false; cachedButtonDetailColor_ = reduceContrast(nb, nf, qMax(qreal(2.5), KColorUtils::contrastRatio(ab, KColorUtils::mix(ab, af, 0.4)))); } diff --git a/clients/oxygen/oxygenbutton.h b/clients/oxygen/oxygenbutton.h index 9d90261c53..4e7f45be63 100644 --- a/clients/oxygen/oxygenbutton.h +++ b/clients/oxygen/oxygenbutton.h @@ -119,7 +119,7 @@ namespace Oxygen //! button status ButtonState status_; - bool colorCacheInvalid_; + // button color QColor cachedButtonDetailColor_; //! timeline used for smooth transitions