diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs index bac29bfcd..64b138a0a 100644 --- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs +++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs @@ -27,12 +27,14 @@ public partial class SettingsPaneThemeViewModel : BaseModel public static string LinkHowToCreateTheme => @"https://flowlauncher.com/docs/#/how-to-create-a-theme"; public static string LinkThemeGallery => "https://github.com/Flow-Launcher/Flow.Launcher/discussions/1438"; - public string SelectedTheme + private Theme.ThemeData _selectedTheme; + public Theme.ThemeData SelectedTheme { - get => Settings.Theme; + get => _selectedTheme ??= Themes.Find(v => v.FileNameWithoutExtension == Settings.Theme); set { - ThemeManager.Instance.ChangeTheme(value); + _selectedTheme = value; + ThemeManager.Instance.ChangeTheme(value.FileNameWithoutExtension); if (ThemeManager.Instance.BlurEnabled && Settings.UseDropShadowEffect) DropShadowEffect = false; diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml index d7051497b..b5d35606c 100644 --- a/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml +++ b/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml @@ -401,8 +401,7 @@ ItemsSource="{Binding Themes}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto" - SelectedValue="{Binding SelectedTheme}" - SelectedValuePath="FileNameWithoutExtension"> + SelectedValue="{Binding SelectedTheme}">