diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs index 5046a4754..65087c8bb 100644 --- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs +++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneThemeViewModel.cs @@ -80,6 +80,7 @@ public partial class SettingsPaneThemeViewModel : BaseModel get => Settings.QueryBoxFontSize; set => Settings.QueryBoxFontSize = value; } + public double ResultItemFontSize { get => Settings.ResultItemFontSize; @@ -94,30 +95,9 @@ public partial class SettingsPaneThemeViewModel : BaseModel public List Themes => ThemeManager.Instance.LoadAvailableThemes().Select(Path.GetFileNameWithoutExtension).ToList(); + public class ColorSchemeData : DropdownDataGeneric { } - public class ColorScheme - { - public string Display { get; set; } - public ColorSchemes Value { get; set; } - } - - public List ColorSchemes - { - get - { - List modes = new List(); - var enums = (ColorSchemes[])Enum.GetValues(typeof(ColorSchemes)); - foreach (var e in enums) - { - var key = $"ColorScheme{e}"; - var display = InternationalizationManager.Instance.GetTranslation(key); - var m = new ColorScheme { Display = display, Value = e, }; - modes.Add(m); - } - - return modes; - } - } + public List ColorSchemes { get; } = DropdownDataGeneric.GetValues("ColorScheme"); public List TimeFormatList { get; } = new() { @@ -185,29 +165,9 @@ public partial class SettingsPaneThemeViewModel : BaseModel set => Settings.UseAnimation = value; } - public class AnimationSpeed - { - public string Display { get; set; } - public AnimationSpeeds Value { get; set; } - } + public class AnimationSpeedData : DropdownDataGeneric { } + public List AnimationSpeeds { get; } = DropdownDataGeneric.GetValues("AnimationSpeed"); - public List AnimationSpeeds - { - get - { - List speeds = new List(); - var enums = (AnimationSpeeds[])Enum.GetValues(typeof(AnimationSpeeds)); - foreach (var e in enums) - { - var key = $"AnimationSpeed{e}"; - var display = InternationalizationManager.Instance.GetTranslation(key); - var m = new AnimationSpeed { Display = display, Value = e, }; - speeds.Add(m); - } - - return speeds; - } - } public bool UseSound { get => Settings.UseSound;