From f109fb8a3c3386337b948e5a3aca0a842b8ff42a Mon Sep 17 00:00:00 2001 From: Hongtao Zhang Date: Sun, 8 Jan 2023 20:03:22 -0600 Subject: [PATCH] Notify MaxResultsToShow to trigger max height change when changing theme --- .../UserSettings/Settings.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 753334e23..55c0d9973 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -13,6 +13,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings public class Settings : BaseModel { private string language = "en"; + private string _theme = Constant.DefaultTheme; public string Hotkey { get; set; } = $"{KeyConstant.Alt} + {KeyConstant.Space}"; public string OpenResultModifiers { get; set; } = KeyConstant.Alt; public string ColorScheme { get; set; } = "System"; @@ -29,7 +30,18 @@ namespace Flow.Launcher.Infrastructure.UserSettings OnPropertyChanged(); } } - public string Theme { get; set; } = Constant.DefaultTheme; + public string Theme + { + get => _theme; + set + { + if (value == _theme) + return; + _theme = value; + OnPropertyChanged(); + OnPropertyChanged(nameof(MaxResultsToShow)); + } + } public bool UseDropShadowEffect { get; set; } = false; public string QueryBoxFont { get; set; } = FontFamily.GenericSansSerif.Name; public string QueryBoxFontStyle { get; set; }