From a5b22cffa2e2a615edae46292d5944d2dcd65e7e Mon Sep 17 00:00:00 2001 From: Alekhya Date: Mon, 28 Sep 2020 12:44:18 -0700 Subject: [PATCH] Changed default theme in settings to be consistent with that of shortcut guide (#6832) * changed default theme to be consistent with that of shortcut guide * change the test to reflect that the initial settings theme or shortcut guide is 'system' and not 'light'. --- .../ShortcutGuideProperties.cs | 2 +- .../ViewModelTests/ShortcutGuide.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Lib/ShortcutGuideProperties.cs b/src/core/Microsoft.PowerToys.Settings.UI.Lib/ShortcutGuideProperties.cs index 4d3bbaf3bc..38a46a0cbb 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Lib/ShortcutGuideProperties.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Lib/ShortcutGuideProperties.cs @@ -12,7 +12,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib { OverlayOpacity = new IntProperty(90); PressTime = new IntProperty(900); - Theme = new StringProperty("light"); + Theme = new StringProperty("system"); } [JsonPropertyName("overlay_opacity")] diff --git a/src/core/Microsoft.PowerToys.Settings.UI.UnitTests/ViewModelTests/ShortcutGuide.cs b/src/core/Microsoft.PowerToys.Settings.UI.UnitTests/ViewModelTests/ShortcutGuide.cs index 24928c1006..ef1dbeb34d 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.UnitTests/ViewModelTests/ShortcutGuide.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.UnitTests/ViewModelTests/ShortcutGuide.cs @@ -62,7 +62,8 @@ namespace ViewModelTests // Arrange ShortcutGuideViewModel viewModel = new ShortcutGuideViewModel(SettingsRepository.GetInstance(mockGeneralSettingsUtils.Object), SettingsRepository.GetInstance(mockShortcutGuideSettingsUtils.Object), SendMockIPCConfigMSG, ShortCutGuideTestFolderName); - Assert.AreEqual(1, viewModel.ThemeIndex); + // Initialize shortcut guide settings theme to 'system' to be in sync with shortcut_guide.h. + Assert.AreEqual(2, viewModel.ThemeIndex); // Act viewModel.ThemeIndex = 0;