diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index 5edf8584c..da3f9f708 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -457,7 +457,7 @@ namespace Flow.Launcher.Core.Resource // ✅ 설정의 ColorScheme을 우선 사용 int themeValue = (int)Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize", "AppsUseLightTheme", 1); bool isSystemDark = themeValue == 0; - bool useDarkMode = Mode == "Dark" || (Mode == "Auto" && _settings.ColorScheme == ColorSchemes.System && isSystemDark) || (_settings.ColorScheme == ColorSchemes.Dark); + bool useDarkMode = Mode == "Dark" || (Mode == "Auto" && _settings.ColorScheme == "System" && isSystemDark) || (_settings.ColorScheme == "Dark"); Color selectedBG = useDarkMode ? DarkBG : LightBG; ApplyPreviewBackground(selectedBG); diff --git a/Flow.Launcher.Infrastructure/Constant.cs b/Flow.Launcher.Infrastructure/Constant.cs index 8a73b8f05..c86ed4324 100644 --- a/Flow.Launcher.Infrastructure/Constant.cs +++ b/Flow.Launcher.Infrastructure/Constant.cs @@ -40,6 +40,10 @@ namespace Flow.Launcher.Infrastructure public const string DefaultTheme = "Win11Light"; + public const string Light = "Light"; + public const string Dark = "Dark"; + public const string System = "System"; + public const string Themes = "Themes"; public const string Settings = "Settings"; public const string Logs = "Logs"; diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 1a46282bc..8277e8e0b 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -37,7 +37,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings private string _theme = Constant.DefaultTheme; public string Hotkey { get; set; } = $"{KeyConstant.Alt} + {KeyConstant.Space}"; public string OpenResultModifiers { get; set; } = KeyConstant.Alt; - public ColorSchemes ColorScheme { get; set; } = ColorSchemes.System; + public string ColorScheme { get; set; } = "System"; public bool ShowOpenResultHotkey { get; set; } = true; public double WindowSize { get; set; } = 580; public string PreviewHotkey { get; set; } = $"F1"; diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 5194e02d0..9f8063a87 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -998,11 +998,11 @@ namespace Flow.Launcher public void InitializeColorScheme() { - if (_settings.ColorScheme == ColorSchemes.Light) + if (_settings.ColorScheme == Constant.Light) { ModernWpf.ThemeManager.Current.ApplicationTheme = ModernWpf.ApplicationTheme.Light; } - else if (_settings.ColorScheme == ColorSchemes.Dark) + else if (_settings.ColorScheme == Constant.Dark) { ModernWpf.ThemeManager.Current.ApplicationTheme = ModernWpf.ApplicationTheme.Dark; } diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs index e4d047f7a..d7bae5e80 100644 --- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs +++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs @@ -108,16 +108,16 @@ public partial class SettingsPaneThemeViewModel : BaseModel public class ColorSchemeData : DropdownDataGeneric { } public List ColorSchemes { get; } = DropdownDataGeneric.GetValues("ColorScheme"); - public ColorSchemes ColorScheme + public string ColorScheme { get => Settings.ColorScheme; set { ThemeManagerForColorSchemeSwitch.Current.ApplicationTheme = value switch { - Infrastructure.UserSettings.ColorSchemes.Light => ApplicationTheme.Light, - Infrastructure.UserSettings.ColorSchemes.Dark => ApplicationTheme.Dark, - Infrastructure.UserSettings.ColorSchemes.System => null, + Constant.Light => ApplicationTheme.Light, + Constant.Dark => ApplicationTheme.Dark, + Constant.System => null, _ => ThemeManagerForColorSchemeSwitch.Current.ApplicationTheme };