Settings: fix default theme selected option (#571)

The call to load_general_settings will throw an exception if the
settings.json file for the general settings is not present. This leaves
settings_theme variable uninitialized, resulting in no value selected in
the general settings screen for users that did not make any changes to
the general settings. This fixes this issue by initializing the value
with a "system" default value.

Fixes: https://github.com/microsoft/PowerToys/issues/560
This commit is contained in:
Bartosz Sosnowski
2019-10-28 21:04:37 +01:00
committed by GitHub
parent dc34379344
commit ad1f1afed0

View File

@@ -7,7 +7,7 @@
using namespace web;
static std::wstring settings_theme;
static std::wstring settings_theme = L"system";
web::json::value load_general_settings() {
auto loaded = PTSettingsHelper::load_general_settings();