forked from qt-creator/qt-creator
macOS: Force light appearance before saving system palette
When using a light theme while macOS is in dark mode, we need to first force the application appearance to be light, before saving the system palette. Otherwise the system palette will contain colors from the dark system appearance. Fixes: QTCREATORBUG-21520 Fixes: QTCREATORBUG-26427 Fixes: QTCREATORBUG-26428 Change-Id: Icf802093de17715d16db5c5735b133f2fc465436 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -160,10 +160,11 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
return false;
|
||||
}
|
||||
const CoreArguments args = parseArguments(arguments);
|
||||
Theme::initialPalette(); // Initialize palette before setting it
|
||||
Theme *themeFromArg = ThemeEntry::createTheme(args.themeId);
|
||||
setCreatorTheme(themeFromArg ? themeFromArg
|
||||
: ThemeEntry::createTheme(ThemeEntry::themeSetting()));
|
||||
Theme *theme = themeFromArg ? themeFromArg
|
||||
: ThemeEntry::createTheme(ThemeEntry::themeSetting());
|
||||
Theme::setInitialPalette(theme); // Initialize palette before setting it
|
||||
setCreatorTheme(theme);
|
||||
InfoBar::initialize(ICore::settings());
|
||||
new ActionManager(this);
|
||||
ActionManager::setPresentationModeEnabled(args.presentationMode);
|
||||
|
||||
Reference in New Issue
Block a user