UI: Set default theme to Yami
Note that this adds a new CurrentTheme3 config variable to preserve settings of versions older than 28, making this change safely backward-compatible.master
parent
de01cfc063
commit
8ef134be79
|
@ -474,11 +474,6 @@ bool OBSApp::InitGlobalConfigDefaults()
|
|||
config_set_default_bool(globalConfig, "BasicWindow", "StudioModeLabels",
|
||||
true);
|
||||
|
||||
if (!config_get_bool(globalConfig, "General", "Pre21Defaults")) {
|
||||
config_set_default_string(globalConfig, "General",
|
||||
"CurrentTheme", DEFAULT_THEME);
|
||||
}
|
||||
|
||||
config_set_default_string(globalConfig, "General", "HotkeyFocusType",
|
||||
"NeverDisableHotkeys");
|
||||
|
||||
|
@ -1138,19 +1133,9 @@ bool OBSApp::InitTheme()
|
|||
defaultStyleSheet = styleSheet();
|
||||
|
||||
const char *themeName =
|
||||
config_get_string(globalConfig, "General", "CurrentTheme2");
|
||||
|
||||
if (!themeName)
|
||||
/* Use deprecated "CurrentTheme" value if available */
|
||||
themeName = config_get_string(globalConfig, "General",
|
||||
"CurrentTheme");
|
||||
if (!themeName)
|
||||
/* Use deprecated "Theme" value if available */
|
||||
themeName = config_get_string(globalConfig, "General", "Theme");
|
||||
config_get_string(globalConfig, "General", "CurrentTheme3");
|
||||
if (!themeName)
|
||||
themeName = DEFAULT_THEME;
|
||||
if (!themeName)
|
||||
themeName = "Dark";
|
||||
|
||||
if (strcmp(themeName, "Default") == 0)
|
||||
themeName = "System";
|
||||
|
|
|
@ -34,4 +34,4 @@
|
|||
#define YOUTUBE_CLIENTID_HASH 0x@YOUTUBE_CLIENTID_HASH@
|
||||
#define YOUTUBE_SECRET_HASH 0x@YOUTUBE_SECRET_HASH@
|
||||
|
||||
#define DEFAULT_THEME "Dark"
|
||||
#define DEFAULT_THEME "Yami"
|
||||
|
|
|
@ -3055,7 +3055,7 @@ void OBSBasicSettings::SaveGeneralSettings()
|
|||
QString themeData = ui->theme->itemData(themeIndex).toString();
|
||||
|
||||
if (WidgetChanged(ui->theme))
|
||||
config_set_string(GetGlobalConfig(), "General", "CurrentTheme2",
|
||||
config_set_string(GetGlobalConfig(), "General", "CurrentTheme3",
|
||||
QT_TO_UTF8(themeData));
|
||||
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
|
|
Loading…
Reference in New Issue