diff --git a/Flow.Launcher.Core/Plugin/PluginManager.cs b/Flow.Launcher.Core/Plugin/PluginManager.cs index 383689c83..3b4a6e445 100644 --- a/Flow.Launcher.Core/Plugin/PluginManager.cs +++ b/Flow.Launcher.Core/Plugin/PluginManager.cs @@ -166,18 +166,18 @@ namespace Flow.Launcher.Core.Plugin public static ICollection ValidPluginsForQuery(Query query) { - if (NonGlobalPlugins.ContainsKey(query.ActionKeyword)) - { - var plugin = NonGlobalPlugins[query.ActionKeyword]; - return new List - { - plugin - }; - } - else - { + if (query is null) + return Array.Empty(); + + if (!NonGlobalPlugins.ContainsKey(query.ActionKeyword)) return GlobalPlugins; - } + + + var plugin = NonGlobalPlugins[query.ActionKeyword]; + return new List + { + plugin + }; } public static async Task> QueryForPluginAsync(PluginPair pair, Query query, CancellationToken token) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index 205abcd34..872c4543e 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -17,7 +17,7 @@ namespace Flow.Launcher.Core.Resource { public class Theme { - private const int ShadowExtraMargin = 12; + private const int ShadowExtraMargin = 32; private readonly List _themeDirectories = new List(); private ResourceDictionary _oldResource; @@ -238,9 +238,10 @@ namespace Flow.Launcher.Core.Resource Property = Border.EffectProperty, Value = new DropShadowEffect { - Opacity = 0.4, - ShadowDepth = 2, - BlurRadius = 15 + Opacity = 0.3, + ShadowDepth = 12, + Direction = 270, + BlurRadius = 30 } }; @@ -250,7 +251,7 @@ namespace Flow.Launcher.Core.Resource marginSetter = new Setter() { Property = Border.MarginProperty, - Value = new Thickness(ShadowExtraMargin), + Value = new Thickness(ShadowExtraMargin, 12, ShadowExtraMargin, ShadowExtraMargin), }; windowBorderStyle.Setters.Add(marginSetter); } diff --git a/Flow.Launcher.Plugin/Result.cs b/Flow.Launcher.Plugin/Result.cs index 35c491d35..7633e34a7 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 @@ -197,5 +201,16 @@ namespace Flow.Launcher.Plugin { return AsyncAction?.Invoke(context) ?? ValueTask.FromResult(Action?.Invoke(context) ?? false); } + + /// + /// 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; } + + /// + /// Optionally set the color of the progress bar + /// + /// #26a0da (blue) + public string ProgressBarColor { get; set; } = "#26a0da"; } } 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 @@ Select Hide Flow Launcher on startup Hide tray icon + When the icon is hidden from the tray, the Settings menu can be opened by right-clicking on the search window. Query Search Precision Changes minimum match score required for results. Should Use Pinyin @@ -71,12 +72,14 @@ Current Priority New Priority Priority + Change Plugin Results Priority Plugin Directory by Init time: Query time: | Version Website + Uninstall diff --git a/Flow.Launcher/Languages/es-419.xaml b/Flow.Launcher/Languages/es-419.xaml index 8ce9f12cf..de7b95c74 100644 --- a/Flow.Launcher/Languages/es-419.xaml +++ b/Flow.Launcher/Languages/es-419.xaml @@ -69,6 +69,7 @@ Prioridad Actual Nueva Prioridad Prioridad + Cambiar la prioridad del resultado del plugin Directorio de Plugins por Tiempo de inicio: diff --git a/Flow.Launcher/Languages/es.xaml b/Flow.Launcher/Languages/es.xaml index d30cd16c9..7d473f64c 100644 --- a/Flow.Launcher/Languages/es.xaml +++ b/Flow.Launcher/Languages/es.xaml @@ -69,6 +69,7 @@ Prioridad actual Nueva prioridad Prioridad + Cambiar la prioridad del resultado del complemento Carpeta de complementos por Tiempo de inicio: diff --git a/Flow.Launcher/Languages/ko.xaml b/Flow.Launcher/Languages/ko.xaml index a5ad2647f..a470da1db 100644 --- a/Flow.Launcher/Languages/ko.xaml +++ b/Flow.Launcher/Languages/ko.xaml @@ -69,6 +69,7 @@ 현재 중요도: 새 중요도: 중요도 + 플러그인 결과 우선 순위 변경 플러그인 폴더 제작자 초기화 시간: diff --git a/Flow.Launcher/Languages/zh-cn.xaml b/Flow.Launcher/Languages/zh-cn.xaml index b3bd5fd1f..3c4bdaea2 100644 --- a/Flow.Launcher/Languages/zh-cn.xaml +++ b/Flow.Launcher/Languages/zh-cn.xaml @@ -69,6 +69,7 @@ 当前优先级 新优先级 优先级 + 更改插件结果优先级 插件目录 出自 加载耗时: diff --git a/Flow.Launcher/Languages/zh-tw.xaml b/Flow.Launcher/Languages/zh-tw.xaml index fea505526..fe769ec5e 100644 --- a/Flow.Launcher/Languages/zh-tw.xaml +++ b/Flow.Launcher/Languages/zh-tw.xaml @@ -69,6 +69,7 @@ 目前優先 新增優先 優先 + 更改插件結果優先順序 外掛資料夾 作者 載入耗時: diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml index 714fcc53f..bd02b560a 100644 --- a/Flow.Launcher/MainWindow.xaml +++ b/Flow.Launcher/MainWindow.xaml @@ -174,6 +174,7 @@ PreviewDragOver="OnPreviewDragOver" Style="{DynamicResource QueryBoxStyle}" Text="{Binding QueryText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" + PreviewKeyUp="QueryTextBox_KeyUp" Visibility="Visible"> diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 2b7db38cf..bc952681d 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,8 @@ using Flow.Launcher.Infrastructure; using System.Windows.Media; using Flow.Launcher.Infrastructure.Hotkey; using Flow.Launcher.Plugin.SharedCommands; +using System.Windows.Data; +using System.Diagnostics; namespace Flow.Launcher { @@ -555,5 +557,14 @@ namespace Flow.Launcher ModernWpf.ThemeManager.Current.ApplicationTheme = ModernWpf.ApplicationTheme.Dark; } } + + private void QueryTextBox_KeyUp(object sender, KeyEventArgs e) + { + if(_viewModel.QueryText != QueryTextBox.Text) + { + BindingExpression be = QueryTextBox.GetBindingExpression(System.Windows.Controls.TextBox.TextProperty); + be.UpdateSource(); + } + } } -} \ No newline at end of file +} diff --git a/Flow.Launcher/PriorityChangeWindow.xaml b/Flow.Launcher/PriorityChangeWindow.xaml index d50bf82db..d6aadead9 100644 --- a/Flow.Launcher/PriorityChangeWindow.xaml +++ b/Flow.Launcher/PriorityChangeWindow.xaml @@ -63,7 +63,6 @@ SearchWeb.OpenInBrowserTab(e.Uri.ToString()); link.Click += (s, e) => SearchWeb.OpenInBrowserTab(url); paragraph.Inlines.Add(textBeforeUrl); diff --git a/Flow.Launcher/Resources/CustomControlTemplate.xaml b/Flow.Launcher/Resources/CustomControlTemplate.xaml index b4d7e78a7..6ab7ab5ad 100644 --- a/Flow.Launcher/Resources/CustomControlTemplate.xaml +++ b/Flow.Launcher/Resources/CustomControlTemplate.xaml @@ -29,7 +29,6 @@ @@ -2724,7 +2723,8 @@ Background="{DynamicResource CustomContextBackground}" BorderBrush="{DynamicResource CustomContextBorder}" BorderThickness="1" - CornerRadius="8"> + CornerRadius="8" + UseLayoutRounding="True"> + Visibility="{Binding ShowIcon}"> + + + + - + + + + + + @@ -871,6 +872,9 @@ ItemsSource="{Binding Languages}" SelectedValue="{Binding Language}" SelectedValuePath="LanguageCode" /> + +  + @@ -997,7 +1001,7 @@ Click="OnPluginPriorityClick" Content="{Binding Priority, UpdateSourceTrigger=PropertyChanged}" Cursor="Hand" - ToolTip="Change Plugin Results Priority"> + ToolTip="{DynamicResource priorityToolTip}"> + + - - - - - - - - - - - #356ef3 + #19ffffff - - - - + - - - - - - - - - - - #356ef3 + #19c9c9c9 - - - - - + - + + - + + + + + - - - - - - #356ef3 - - - - - + - - - - - - - - - + + #192026 - - - - - - - + - - - - #198F8F8F - - - - - - -