Theming: Allow to apply theme palette globally

Change-Id: I709bd6b6c566e016731af1fb94ddaef6326ef485
Reviewed-by: Thorben Kroeger <thorbenkroeger@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Thorben Kroeger
2014-10-20 21:43:21 +02:00
committed by Orgad Shaneh
parent 48a90eea3c
commit 82bbc6f562
5 changed files with 8 additions and 1 deletions

View File

@@ -131,6 +131,8 @@ void CorePlugin::parseArguments(const QStringList &arguments)
Theme *theme = new Theme(qApp);
theme->readSettings(themeSettings);
setCreatorTheme(theme);
if (theme->flag(Theme::ApplyThemePaletteGlobally))
QApplication::setPalette(creatorTheme()->palette(QApplication::palette()));
// defer creation of these widgets until here,
// because they need a valid theme set