From 64b80fc1fe0217c14dd3a7e3e9ccfbacc074b38a Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Sun, 18 Oct 2009 21:14:40 +0000 Subject: [PATCH] Fixed background role for button icon. CCBUG: 156518 svn path=/trunk/KDE/kdebase/workspace/; revision=1037374 --- clients/oxygen/oxygenbutton.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/clients/oxygen/oxygenbutton.cpp b/clients/oxygen/oxygenbutton.cpp index a3d56c2e15..a34ff2a4e1 100644 --- a/clients/oxygen/oxygenbutton.cpp +++ b/clients/oxygen/oxygenbutton.cpp @@ -90,14 +90,14 @@ namespace Oxygen QColor OxygenButton::buttonDetailColor(const QPalette &palette, bool active) { - if( active ) return palette.color(QPalette::Active, QPalette::ButtonText); + if( active ) return palette.color(QPalette::Active, QPalette::WindowText); else { // todo: re-implement caching - 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); + QColor ab = palette.color(QPalette::Active, QPalette::Window); + QColor af = palette.color(QPalette::Active, QPalette::WindowText); + QColor nb = palette.color(QPalette::Inactive, QPalette::Window); + QColor nf = palette.color(QPalette::Inactive, QPalette::WindowText); return reduceContrast(nb, nf, qMax(qreal(2.5), KColorUtils::contrastRatio(ab, KColorUtils::mix(ab, af, 0.4)))); }