diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml
index cdf243127..9ca403f07 100644
--- a/Flow.Launcher/SettingWindow.xaml
+++ b/Flow.Launcher/SettingWindow.xaml
@@ -19,35 +19,35 @@
Height="700" Width="1000"
MinWidth="900"
MinHeight="600"
- Loaded="OnLoaded"
+ Loaded="OnLoaded"
Closed="OnClosed"
d:DataContext="{d:DesignInstance vm:SettingWindowViewModel}">
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
+
+
+
-
-
-
+
+
+
@@ -280,27 +279,36 @@
-
-
+
+
-
-
+
+
+
+
-
-
+
+
-
+
-
+
-
-
-
+
+
@@ -309,11 +317,13 @@
-
+
-
-
-
+
+
@@ -322,10 +332,11 @@
-
+
-
-
+
@@ -333,31 +344,35 @@
-
+
-
-
+
-
+
-
-
+
-
+
-
-
-
+
+
@@ -366,12 +381,16 @@
-
-
+
+
-
-
-
+
+
@@ -380,10 +399,13 @@
-
+
-
-
+
+
@@ -392,10 +414,13 @@
-
+
-
-
+
+
@@ -405,29 +430,36 @@
-
+
+ ItemsSource="{Binding QuerySearchPrecisionStrings}"
+ SelectedItem="{Binding Settings.QuerySearchPrecisionString}"
+ Grid.Column="2" />
-
+
-
+
+ ItemsSource="{Binding LastQueryModes}"
+ SelectedValue="{Binding Settings.LastQueryMode}"
+ DisplayMemberPath="Display" SelectedValuePath="Value" Grid.Column="2" />
-
+
-
-
-
-
+
+
+
+
@@ -437,12 +469,15 @@
-
+
-
+
+ Content="{DynamicResource selectPythonDirectory}" Margin="10 10 18 10" />
@@ -450,20 +485,25 @@
-
+
+ ItemsSource="{Binding Languages}" SelectedValue="{Binding Language}"
+ DisplayMemberPath="Display" SelectedValuePath="LanguageCode" Grid.Column="2" />
-
-
+
+
-
+
@@ -473,104 +513,143 @@
-
-
+
+
-
-
+
+
+
+
-
+
-
-
-
+
+
+ Margin="0, 0, 0, 0" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
+ ItemContainerStyle="{StaticResource PluginList}"
+ ScrollViewer.IsDeferredScrollingEnabled="True" ScrollViewer.CanContentScroll="False"
+ Padding="0" Width="Auto" HorizontalAlignment="Stretch">
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ Width="32" Height="32" Margin="32 0 0 0"
+ FlowDirection="LeftToRight" />
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ MaxWidth="120" Cursor="Hand" Margin="10,0,0,0"
+ MouseUp="OnPluginDirecotyClick" Foreground="Blue"
+ HorizontalAlignment="Right" />
-
-
-
-
+
+
+
+
@@ -658,62 +737,74 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
-
+
-
+ HorizontalAlignment="Center" VerticalAlignment="Center">
+
-
-
-
+
+
+
-
+
+ Text="{DynamicResource hiThere}" IsReadOnly="True"
+ Style="{DynamicResource QueryBoxStyle}" />
-
+
-
+
@@ -723,25 +814,29 @@
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Flow.Launcher/ViewModel/PluginViewModel.cs b/Flow.Launcher/ViewModel/PluginViewModel.cs
index 1ac320cf0..0caf8aa64 100644
--- a/Flow.Launcher/ViewModel/PluginViewModel.cs
+++ b/Flow.Launcher/ViewModel/PluginViewModel.cs
@@ -3,6 +3,7 @@ using System.Windows.Media;
using Flow.Launcher.Plugin;
using Flow.Launcher.Infrastructure.Image;
using Flow.Launcher.Core.Plugin;
+using System.Windows.Controls;
namespace Flow.Launcher.ViewModel
{
@@ -14,11 +15,23 @@ namespace Flow.Launcher.ViewModel
public bool PluginState
{
get { return !PluginPair.Metadata.Disabled; }
- set
+ set
{
- PluginPair.Metadata.Disabled = !value;
+ PluginPair.Metadata.Disabled = !value;
}
}
+
+ public Control SettingControl
+ {
+ get
+ {
+ if (PluginPair.Plugin is not ISettingProvider settingProvider)
+ return new Control();
+
+ return settingProvider.CreateSettingPanel();
+ }
+ }
+
public Visibility ActionKeywordsVisibility => PluginPair.Metadata.ActionKeywords.Count == 1 ? Visibility.Visible : Visibility.Collapsed;
public string InitilizaTime => PluginPair.Metadata.InitTime.ToString() + "ms";
public string QueryTime => PluginPair.Metadata.AvgQueryTime + "ms";
@@ -28,7 +41,7 @@ namespace Flow.Launcher.ViewModel
public void ChangeActionKeyword(string newActionKeyword, string oldActionKeyword)
{
PluginManager.ReplaceActionKeyword(PluginPair.Metadata.ID, oldActionKeyword, newActionKeyword);
-
+
OnPropertyChanged(nameof(ActionKeywordsText));
}