Fixed background role for button icon. CCBUG: 156518
svn path=/trunk/KDE/kdebase/workspace/; revision=1037374
This commit is contained in:
parent
7e2917761e
commit
64b80fc1fe
1 changed files with 5 additions and 5 deletions
|
@ -90,14 +90,14 @@ namespace Oxygen
|
||||||
QColor OxygenButton::buttonDetailColor(const QPalette &palette, bool active)
|
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 {
|
else {
|
||||||
|
|
||||||
// todo: re-implement caching
|
// todo: re-implement caching
|
||||||
QColor ab = palette.color(QPalette::Active, QPalette::Button);
|
QColor ab = palette.color(QPalette::Active, QPalette::Window);
|
||||||
QColor af = palette.color(QPalette::Active, QPalette::ButtonText);
|
QColor af = palette.color(QPalette::Active, QPalette::WindowText);
|
||||||
QColor nb = palette.color(QPalette::Inactive, QPalette::Button);
|
QColor nb = palette.color(QPalette::Inactive, QPalette::Window);
|
||||||
QColor nf = palette.color(QPalette::Inactive, QPalette::ButtonText);
|
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))));
|
return reduceContrast(nb, nf, qMax(qreal(2.5), KColorUtils::contrastRatio(ab, KColorUtils::mix(ab, af, 0.4))));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue