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:
parent
06555da965
commit
9adf70d77e
@ -45,12 +45,12 @@ void StyleSheetLoader::UpdateStyleSheet(QWidget *widget) {
|
|||||||
|
|
||||||
// Replace %palette-role with actual colours
|
// Replace %palette-role with actual colours
|
||||||
QPalette p(widget->palette());
|
QPalette p(widget->palette());
|
||||||
// HACK
|
|
||||||
QColor alt = p.color(QPalette::AlternateBase);
|
QColor alt = p.color(QPalette::AlternateBase);
|
||||||
alt.setAlpha(50);
|
alt.setAlpha(50);
|
||||||
QString name = QString(
|
contents.replace("%palette-alternate-base", QString("rgba(%1,%2,%3,%4%)")
|
||||||
"qrgba(%1,%2,%3,%4)").arg(alt.red()).arg(alt.green()).arg(alt.blue()).arg(alt.alpha());
|
.arg(alt.red()).arg(alt.green()).arg(alt.blue()).arg(alt.alpha()));
|
||||||
contents.replace("%palette-alternate-base", name);
|
|
||||||
ReplaceColor(&contents, "Window", p, QPalette::Window);
|
ReplaceColor(&contents, "Window", p, QPalette::Window);
|
||||||
ReplaceColor(&contents, "Background", p, QPalette::Background);
|
ReplaceColor(&contents, "Background", p, QPalette::Background);
|
||||||
ReplaceColor(&contents, "WindowText", p, QPalette::WindowText);
|
ReplaceColor(&contents, "WindowText", p, QPalette::WindowText);
|
||||||
|
Loading…
Reference in New Issue
Block a user