From 239c9d7a93b08c5a575d9dd1837d2973b15f0086 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Tue, 30 Aug 2022 04:26:22 -0400 Subject: [PATCH 01/16] Add field to control if Icon uses rounded mask --- Flow.Launcher.Plugin/Result.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs index 35c491d35..a9dda4ff4 100644 --- a/Flow.Launcher.Plugin/Result.cs +++ b/Flow.Launcher.Plugin/Result.cs @@ -66,6 +66,10 @@ namespace Flow.Launcher.Plugin } } } + /// + /// Determines if Icon has a border radius + /// + public bool RoundedIcon { get; set; } = false; /// /// Delegate function, see From 70ea6a89e3b8bff59a0b1c122102d54c322df3f6 Mon Sep 17 00:00:00 2001 From: Garulf <535299+Garulf@users.noreply.github.com> Date: Tue, 30 Aug 2022 04:27:17 -0400 Subject: [PATCH 02/16] Remove Icon X & Y hard coded dependency --- Flow.Launcher/ResultListBox.xaml | 4 ++-- Flow.Launcher/ViewModel/ResultViewModel.cs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/ResultListBox.xaml b/Flow.Launcher/ResultListBox.xaml index 2a7f9c494..3728b868d 100644 --- a/Flow.Launcher/ResultListBox.xaml +++ b/Flow.Launcher/ResultListBox.xaml @@ -82,8 +82,8 @@ BorderThickness="0"> Date: Tue, 30 Aug 2022 04:27:37 -0400 Subject: [PATCH 03/16] Add clip mask --- Flow.Launcher/ResultListBox.xaml | 6 +++++- Flow.Launcher/ViewModel/ResultViewModel.cs | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/ResultListBox.xaml b/Flow.Launcher/ResultListBox.xaml index 3728b868d..e4051c536 100644 --- a/Flow.Launcher/ResultListBox.xaml +++ b/Flow.Launcher/ResultListBox.xaml @@ -88,7 +88,11 @@ HorizontalAlignment="Center" Source="{Binding Image, TargetNullValue={x:Null}}" Stretch="Uniform" - Visibility="{Binding ShowIcon}" /> + Visibility="{Binding ShowIcon}"> + + + + Date: Wed, 14 Sep 2022 17:50:42 +0900 Subject: [PATCH 04/16] Fixed Query Textbox Binding event --- Flow.Launcher/MainWindow.xaml | 3 ++- Flow.Launcher/MainWindow.xaml.cs | 11 +++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 714fcc53f..a3ea9c831 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -173,7 +173,8 @@ Background="Transparent" PreviewDragOver="OnPreviewDragOver" Style="{DynamicResource QueryBoxStyle}" - Text="{Binding QueryText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" + Text="{Binding QueryText, Mode=TwoWay, UpdateSourceTrigger=Explicit}" + PreviewKeyUp="QueryTextBox_KeyUp" Visibility="Visible"> diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 2b7db38cf..a4d02fb50 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel; using System.Threading.Tasks; using System.Windows; @@ -20,6 +20,7 @@ using Flow.Launcher.Infrastructure; using System.Windows.Media; using Flow.Launcher.Infrastructure.Hotkey; using Flow.Launcher.Plugin.SharedCommands; +using System.Windows.Data; namespace Flow.Launcher { @@ -555,5 +556,11 @@ namespace Flow.Launcher ModernWpf.ThemeManager.Current.ApplicationTheme = ModernWpf.ApplicationTheme.Dark; } } + + private void QueryTextBox_KeyUp(object sender, KeyEventArgs e) + { + BindingExpression be = QueryTextBox.GetBindingExpression(System.Windows.Controls.TextBox.TextProperty); + be.UpdateSource(); + } } -} \ No newline at end of file +} From d4ffa93395aa2691becedfa4b2608376fc81d9b0 Mon Sep 17 00:00:00 2001 From: Sparrkle Date: Thu, 15 Sep 2022 15:25:20 +0900 Subject: [PATCH 05/16] Modified to trigger when the value changes. --- Flow.Launcher/MainWindow.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index a4d02fb50..20bfa0d62 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -21,6 +21,7 @@ using System.Windows.Media; using Flow.Launcher.Infrastructure.Hotkey; using Flow.Launcher.Plugin.SharedCommands; using System.Windows.Data; +using System.Diagnostics; namespace Flow.Launcher { @@ -559,8 +560,7 @@ namespace Flow.Launcher private void QueryTextBox_KeyUp(object sender, KeyEventArgs e) { - BindingExpression be = QueryTextBox.GetBindingExpression(System.Windows.Controls.TextBox.TextProperty); - be.UpdateSource(); + _viewModel.ChangeQueryText(QueryTextBox.Text); } } } From 314f2d6a9077d7dc6f99656bcd2ccea8994dcf1d Mon Sep 17 00:00:00 2001 From: Sparrkle Date: Thu, 15 Sep 2022 15:57:05 +0900 Subject: [PATCH 06/16] Fixed Progressbar Binding Error (ProgressBar Value is Not Nullable) --- Flow.Launcher.Plugin/Result.cs | 7 ++++++- Flow.Launcher/ResultListBox.xaml | 2 +- Flow.Launcher/Themes/Base.xaml | 8 +++----- .../Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs | 5 +++-- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs index 136395467..f8c2c391f 100644 --- a/Flow.Launcher.Plugin/Result.cs +++ b/Flow.Launcher.Plugin/Result.cs @@ -201,7 +201,12 @@ namespace Flow.Launcher.Plugin /// /// Progress bar display. Providing an int value between 0-100 will trigger the progress bar to be displayed on the result /// - public int? ProgressBar { get; set; } + public int ProgressBarValue { get; set; } + + /// + /// Progress bar visibility Check + /// + public bool IsProgressBarVisible { get; set; } = false; /// /// Optionally set the color of the progress bar diff --git a/Flow.Launcher/ResultListBox.xaml b/Flow.Launcher/ResultListBox.xaml index 2c78f9bab..be8bdde41 100644 --- a/Flow.Launcher/ResultListBox.xaml +++ b/Flow.Launcher/ResultListBox.xaml @@ -115,7 +115,7 @@ x:Name="progressbarResult" Foreground="{Binding Result.ProgressBarColor}" Style="{DynamicResource ProgressBarResult}" - Value="{Binding Result.ProgressBar}" /> + Value="{Binding Result.ProgressBarValue}" /> + + From f0d6961ede622e816168c7540d53f2e79c32883e Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Thu, 29 Sep 2022 14:00:53 +0800 Subject: [PATCH 12/16] Remove all Segoe UI usage. --- Flow.Launcher/ActionKeywords.xaml | 1 - Flow.Launcher/CustomQueryHotkeySetting.xaml | 1 - Flow.Launcher/PriorityChangeWindow.xaml | 1 - Flow.Launcher/Resources/CustomControlTemplate.xaml | 1 - Flow.Launcher/SelectBrowserWindow.xaml | 1 - Flow.Launcher/SelectFileManagerWindow.xaml | 1 - .../Views/CustomBrowserSetting.xaml | 1 - .../Views/ActionKeywordSetting.xaml | 1 - Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml | 1 - Plugins/Flow.Launcher.Plugin.Program/ProgramSuffixes.xaml | 1 - Plugins/Flow.Launcher.Plugin.WebSearch/SearchSourceSetting.xaml | 1 - 11 files changed, 11 deletions(-) diff --git a/Flow.Launcher/ActionKeywords.xaml b/Flow.Launcher/ActionKeywords.xaml index e94aac9f6..740b0d402 100644 --- a/Flow.Launcher/ActionKeywords.xaml +++ b/Flow.Launcher/ActionKeywords.xaml @@ -58,7 +58,6 @@ diff --git a/Flow.Launcher/SelectBrowserWindow.xaml b/Flow.Launcher/SelectBrowserWindow.xaml index 98bc391dd..88fd581b4 100644 --- a/Flow.Launcher/SelectBrowserWindow.xaml +++ b/Flow.Launcher/SelectBrowserWindow.xaml @@ -62,7 +62,6 @@ Date: Thu, 29 Sep 2022 17:35:32 +0900 Subject: [PATCH 13/16] Fix Blurry Context menu in querybox --- Flow.Launcher/Resources/CustomControlTemplate.xaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml index b4d7e78a7..b3993fb8c 100644 --- a/Flow.Launcher/Resources/CustomControlTemplate.xaml +++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml @@ -2724,7 +2724,8 @@ Background="{DynamicResource CustomContextBackground}" BorderBrush="{DynamicResource CustomContextBorder}" BorderThickness="1" - CornerRadius="8"> + CornerRadius="8" + UseLayoutRounding="True"> Date: Fri, 30 Sep 2022 09:58:33 +0900 Subject: [PATCH 14/16] Change ProgressBar Value to Nullable. --- Flow.Launcher.Plugin/Result.cs | 7 +------ Flow.Launcher/ResultListBox.xaml | 19 ++++++++++++------- Flow.Launcher/ViewModel/ResultViewModel.cs | 10 ++++++++++ .../Search/ResultManager.cs | 3 +-- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs index f8c2c391f..136395467 100644 --- a/Flow.Launcher.Plugin/Result.cs +++ b/Flow.Launcher.Plugin/Result.cs @@ -201,12 +201,7 @@ namespace Flow.Launcher.Plugin /// /// Progress bar display. Providing an int value between 0-100 will trigger the progress bar to be displayed on the result /// - public int ProgressBarValue { get; set; } - - /// - /// Progress bar visibility Check - /// - public bool IsProgressBarVisible { get; set; } = false; + public int? ProgressBar { get; set; } /// /// Optionally set the color of the progress bar diff --git a/Flow.Launcher/ResultListBox.xaml b/Flow.Launcher/ResultListBox.xaml index 16f2555a9..80a4fc720 100644 --- a/Flow.Launcher/ResultListBox.xaml +++ b/Flow.Launcher/ResultListBox.xaml @@ -28,10 +28,6 @@ mc:Ignorable="d"> - - - -