forked from qt-creator/qt-creator
Theming: Store initial palette
Change-Id: Iea8b74534a59d8410814f9dd41225b88e1e81f75 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
ab83c30f87
commit
3ec16fe4d8
@@ -133,7 +133,7 @@ void CorePlugin::parseArguments(const QStringList &arguments)
|
||||
theme->readSettings(themeSettings);
|
||||
setCreatorTheme(theme);
|
||||
if (theme->flag(Theme::ApplyThemePaletteGlobally))
|
||||
QApplication::setPalette(creatorTheme()->palette(QApplication::palette()));
|
||||
QApplication::setPalette(creatorTheme()->palette());
|
||||
|
||||
// defer creation of these widgets until here,
|
||||
// because they need a valid theme set
|
||||
@@ -148,6 +148,7 @@ void CorePlugin::parseArguments(const QStringList &arguments)
|
||||
|
||||
bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
{
|
||||
Theme::initialPalette(); // Initialize palette before setting it
|
||||
qsrand(QDateTime::currentDateTime().toTime_t());
|
||||
parseArguments(arguments);
|
||||
const bool success = m_mainWindow->init(errorMessage);
|
||||
|
Reference in New Issue
Block a user