Browse Source

UI: Change default theme to dark for new users

jp9000 7 years ago
parent
commit
e038bd8e55
1 changed files with 16 additions and 0 deletions
  1. 16 0
      UI/obs-app.cpp

+ 16 - 0
UI/obs-app.cpp

@@ -412,6 +412,11 @@ bool OBSApp::InitGlobalConfigDefaults()
 	config_set_default_bool(globalConfig, "BasicWindow",
 			"ShowStatusBar", true);
 
+	if (!config_get_bool(globalConfig, "General", "Pre21Defaults")) {
+		config_set_default_string(globalConfig, "General",
+				"CurrentTheme", "Dark");
+	}
+
 #ifdef _WIN32
 	config_set_default_bool(globalConfig, "Audio", "DisableAudioDucking",
 			true);
@@ -636,6 +641,17 @@ bool OBSApp::InitGlobalConfig()
 		changed = true;
 	}
 
+	if (!config_has_user_value(globalConfig, "General", "Pre21Defaults")) {
+		uint32_t lastVersion = config_get_int(globalConfig, "General",
+				"LastVersion");
+		bool useOldDefaults = lastVersion &&
+		    lastVersion < MAKE_SEMANTIC_VERSION(21, 0, 0);
+
+		config_set_bool(globalConfig, "General", "Pre21Defaults",
+				useOldDefaults);
+		changed = true;
+	}
+
 	if (changed)
 		config_save_safe(globalConfig, "tmp", nullptr);