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

Forgot stylesheet changes :-)

This commit is contained in:
John Maguire 2010-03-25 11:39:44 +00:00
parent 6b6ce0e582
commit 5dc9f2358f

View File

@ -42,8 +42,16 @@ void StyleSheetLoader::UpdateStyleSheet(QWidget *widget) {
}
QString contents(file.readAll());
// 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());
qDebug() << name;
contents.replace("%palette-alternate-base", name);
ReplaceColor(&contents, "Window", p, QPalette::Window);
ReplaceColor(&contents, "Background", p, QPalette::Background);
ReplaceColor(&contents, "WindowText", p, QPalette::WindowText);