1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-15 10:48:33 +01:00

Fix the alternate background colour

This commit is contained in:
David Sansome 2010-03-25 13:38:57 +00:00
parent 06555da965
commit 9adf70d77e

View File

@ -45,12 +45,12 @@ void StyleSheetLoader::UpdateStyleSheet(QWidget *widget) {
// Replace %palette-role with actual colours
QPalette p(widget->palette());
// HACK
QColor alt = p.color(QPalette::AlternateBase);
alt.setAlpha(50);
QString name = QString(
"qrgba(%1,%2,%3,%4)").arg(alt.red()).arg(alt.green()).arg(alt.blue()).arg(alt.alpha());
contents.replace("%palette-alternate-base", name);
contents.replace("%palette-alternate-base", QString("rgba(%1,%2,%3,%4%)")
.arg(alt.red()).arg(alt.green()).arg(alt.blue()).arg(alt.alpha()));
ReplaceColor(&contents, "Window", p, QPalette::Window);
ReplaceColor(&contents, "Background", p, QPalette::Background);
ReplaceColor(&contents, "WindowText", p, QPalette::WindowText);