fixes for platforms where qreal is not a double

btw, wouldn't it be cleaner if all those qMin(0.0, qMax(1.0, foo)) calls are calls to qBound instead?

svn path=/trunk/KDE/kdebase/workspace/; revision=748283
icc-effect-5.14.5
Marijn Kruisselbrink 2007-12-14 01:38:32 +00:00
parent 18ac3ed822
commit e185ec3c8b
2 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ QColor OxygenButton::buttonDetailColor(const QPalette &palette)
QColor nf = palette.color(QPalette::Inactive, QPalette::ButtonText);
colorCacheInvalid_ = false;
cachedButtonDetailColor_ = reduceContrast(nb, nf, qMax(2.5, KColorUtils::contrastRatio(ab, KColorUtils::mix(ab, af, 0.4))));
cachedButtonDetailColor_ = reduceContrast(nb, nf, qMax(qreal(2.5), KColorUtils::contrastRatio(ab, KColorUtils::mix(ab, af, 0.4))));
}
return cachedButtonDetailColor_;
}

View File

@ -237,7 +237,7 @@ QColor OxygenClient::titlebarTextColor(const QPalette &palette)
QColor nf = palette.color(QPalette::Inactive, QPalette::WindowText);
colorCacheInvalid_ = false;
cachedTitlebarTextColor_ = reduceContrast(nb, nf, qMax(2.5, KColorUtils::contrastRatio(ab, KColorUtils::mix(ab, af, 0.4))));
cachedTitlebarTextColor_ = reduceContrast(nb, nf, qMax(qreal(2.5), KColorUtils::contrastRatio(ab, KColorUtils::mix(ab, af, 0.4))));
}
return cachedTitlebarTextColor_;
}