Fix KDE calculated colors being all black
KDE calculated colors weren't set correctly rendering all calculated colors "Light", "Midlight", "Mid" and "Dark" as black. Issues fixed: * QFrame with frameStyle Box|Raised didn't look raised but instead just black border. * QMdiArea had black background * QToolBox separators were just black Change-Id: I5e06bafe280f73af12f23960ae68a8b35e8549ac Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Kimmo Leppälä <kimmo.leppala@digia.com>
This commit is contained in:
parent
49f30168c0
commit
cd820569dc
@ -317,19 +317,23 @@ void QKdeThemePrivate::readKdeSystemPalette(const QSettings &kdeSettings, QPalet
|
||||
const QBrush buttonBrushDark = QBrush(button.darker(v > 128 ? 200 : 50));
|
||||
const QBrush buttonBrushDark150 = QBrush(button.darker(v > 128 ? 150 : 75));
|
||||
const QBrush buttonBrushLight150 = QBrush(button.lighter(v > 128 ? 150 : 75));
|
||||
const QBrush buttonBrushLight = QBrush(button.lighter(v > 128 ? 200 : 50));
|
||||
|
||||
pal->setBrush(QPalette::Disabled, QPalette::WindowText, buttonBrushDark);
|
||||
pal->setBrush(QPalette::Disabled, QPalette::ButtonText, buttonBrushDark);
|
||||
pal->setBrush(QPalette::Disabled, QPalette::Button, buttonBrush);
|
||||
pal->setBrush(QPalette::Disabled, QPalette::Light, buttonBrushLight150);
|
||||
pal->setBrush(QPalette::Disabled, QPalette::Dark, buttonBrushDark);
|
||||
pal->setBrush(QPalette::Disabled, QPalette::Mid, buttonBrushDark150);
|
||||
pal->setBrush(QPalette::Disabled, QPalette::Text, buttonBrushDark);
|
||||
pal->setBrush(QPalette::Disabled, QPalette::BrightText, whiteBrush);
|
||||
pal->setBrush(QPalette::Disabled, QPalette::Base, buttonBrush);
|
||||
pal->setBrush(QPalette::Disabled, QPalette::Window, buttonBrush);
|
||||
pal->setBrush(QPalette::Disabled, QPalette::Highlight, buttonBrushDark150);
|
||||
pal->setBrush(QPalette::Disabled, QPalette::HighlightedText, buttonBrushLight150);
|
||||
|
||||
// set calculated colors for all groups
|
||||
pal->setBrush(QPalette::Light, buttonBrushLight);
|
||||
pal->setBrush(QPalette::Midlight, buttonBrushLight150);
|
||||
pal->setBrush(QPalette::Mid, buttonBrushDark150);
|
||||
pal->setBrush(QPalette::Dark, buttonBrushDark);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user