From 5dc9f2358fae731a884a0bfaa515279e585ff230 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Thu, 25 Mar 2010 11:39:44 +0000 Subject: [PATCH] Forgot stylesheet changes :-) --- src/stylesheetloader.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/stylesheetloader.cpp b/src/stylesheetloader.cpp index 2697ae7b4..fd900c17c 100644 --- a/src/stylesheetloader.cpp +++ b/src/stylesheetloader.cpp @@ -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);