From 8aa36f38c82a388c386d7e3d86c44798dad632ad Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Tue, 13 May 2025 21:50:13 +0800 Subject: [PATCH 1/5] Add ShowAtTopmost in settings --- .../UserSettings/Settings.cs | 38 +++++++++++++++---- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 34bf4f90e5c..3f382c276aa 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -59,8 +59,11 @@ public string Language get => _language; set { - _language = value; - OnPropertyChanged(); + if (_language != value) + { + _language = value; + OnPropertyChanged(); + } } } public string Theme @@ -68,7 +71,7 @@ public string Theme get => _theme; set { - if (value != _theme) + if (_theme != value) { _theme = value; OnPropertyChanged(); @@ -283,9 +286,12 @@ public SearchPrecisionScore QuerySearchPrecision get => _querySearchPrecision; set { - _querySearchPrecision = value; - if (_stringMatcher != null) - _stringMatcher.UserSettingSearchPrecision = value; + if (_querySearchPrecision != value) + { + _querySearchPrecision = value; + if (_stringMatcher != null) + _stringMatcher.UserSettingSearchPrecision = value; + } } } @@ -348,12 +354,28 @@ public bool HideNotifyIcon get => _hideNotifyIcon; set { - _hideNotifyIcon = value; - OnPropertyChanged(); + if (_hideNotifyIcon != value) + { + _hideNotifyIcon = value; + OnPropertyChanged(); + } } } public bool LeaveCmdOpen { get; set; } public bool HideWhenDeactivated { get; set; } = true; + private bool _showAtTopmost; + public bool ShowAtTopmost + { + get => _showAtTopmost; + set + { + if (_showAtTopmost != value) + { + _showAtTopmost = value; + OnPropertyChanged(); + } + } + } public bool SearchQueryResultsWithDelay { get; set; } public int SearchDelayTime { get; set; } = 150; From 587ab629aa9b831ba8ed684eb2039dbba6b28ff1 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Tue, 13 May 2025 21:54:03 +0800 Subject: [PATCH 2/5] Support changing ShowAtTopmost --- Flow.Launcher/MainWindow.xaml.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 46eeb2adc6e..72a990ada70 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -84,6 +84,8 @@ public MainWindow() _viewModel = Ioc.Default.GetRequiredService(); DataContext = _viewModel; + Topmost = _settings.ShowAtTopmost; + InitializeComponent(); UpdatePosition(); @@ -283,6 +285,9 @@ private async void OnLoaded(object sender, RoutedEventArgs _) _viewModel.QueryResults(); } break; + case nameof(Settings.ShowAtTopmost): + Topmost = _settings.ShowAtTopmost; + break; } }; From 4e88ce3f48b9eae47dc57c595acfe7862b540476 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Tue, 13 May 2025 22:01:36 +0800 Subject: [PATCH 3/5] Set ShowAtTopmost default to true --- Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 3f382c276aa..7cd3821dc0b 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -363,7 +363,7 @@ public bool HideNotifyIcon } public bool LeaveCmdOpen { get; set; } public bool HideWhenDeactivated { get; set; } = true; - private bool _showAtTopmost; + private bool _showAtTopmost = true; public bool ShowAtTopmost { get => _showAtTopmost; From b8f743eb4c2ad44bc89366698a6ee8543d1d5343 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Tue, 13 May 2025 22:06:04 +0800 Subject: [PATCH 4/5] Add ui in general setting page --- Flow.Launcher/Languages/en.xaml | 2 ++ .../SettingPages/Views/SettingsPaneGeneral.xaml | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml index 22ab2016cc0..f728f10955e 100644 --- a/Flow.Launcher/Languages/en.xaml +++ b/Flow.Launcher/Languages/en.xaml @@ -131,6 +131,8 @@ Show History Results in Home Page Maximum History Results Shown in Home Page This can only be edited if plugin supports Home feature and Home Page is enabled. + Show Search Window at Topmost + Show search window above other windows Search Plugin diff --git a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml index c0c5613de04..fba1b3d865e 100644 --- a/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml +++ b/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml @@ -77,6 +77,17 @@ OnContent="{DynamicResource enable}" /> + + + + From b636f253e65114639dca2aa7d14271d013a993a6 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Tue, 13 May 2025 22:52:06 +0800 Subject: [PATCH 5/5] Add blank line --- Flow.Launcher.Infrastructure/UserSettings/Settings.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs index 7cd3821dc0b..8dc48f7f24e 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs @@ -363,6 +363,7 @@ public bool HideNotifyIcon } public bool LeaveCmdOpen { get; set; } public bool HideWhenDeactivated { get; set; } = true; + private bool _showAtTopmost = true; public bool ShowAtTopmost {