mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 12:18:50 +02:00
close #83 Merge Plugin tab and Feature tab
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
<ListBoxItem HorizontalContentAlignment="Stretch"
|
<ListBoxItem HorizontalContentAlignment="Stretch"
|
||||||
IsEnabled="False"
|
IsEnabled="False"
|
||||||
IsHitTestVisible="False" x:Key="FeatureBoxSeperator">
|
IsHitTestVisible="False" x:Key="FeatureBoxSeperator">
|
||||||
<Separator Width="{Binding ElementName=featureBox, Path=ActualWidth}"/>
|
<Separator Width="{Binding ElementName=lbPlugins, Path=ActualWidth}"/>
|
||||||
</ListBoxItem>
|
</ListBoxItem>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<TabControl Height="auto" >
|
<TabControl Height="auto" >
|
||||||
@@ -40,13 +40,13 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Features">
|
<TabItem Header="Plugin">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="200"/>
|
<ColumnDefinition Width="200"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<ListBox x:Name="featureBox" Grid.Column="0" Margin="0" SelectionChanged="featureBox_OnSelectionChanged" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Grid.IsSharedSizeScope="True" >
|
<ListBox x:Name="lbPlugins" Grid.Column="0" Margin="0" SelectionChanged="lbPlugins_OnSelectionChanged" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Grid.IsSharedSizeScope="True" >
|
||||||
<ListBox.Resources>
|
<ListBox.Resources>
|
||||||
<DataTemplate DataType="{x:Type system:BaseSystemPlugin}">
|
<DataTemplate DataType="{x:Type system:BaseSystemPlugin}">
|
||||||
<Grid Height="36" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3">
|
<Grid Height="36" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="3">
|
||||||
@@ -280,20 +280,5 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Plugins">
|
|
||||||
<StackPanel Orientation="Vertical" Margin="10">
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="10">
|
|
||||||
<CheckBox x:Name="cbEnablePythonPlugins" />
|
|
||||||
<TextBlock Text="Enable Python Plugins" />
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="10">
|
|
||||||
<Button x:Name="btnEnableInstaller" Click="BtnEnableInstaller_OnClick" Content="enable plugin installer"/>
|
|
||||||
</StackPanel>
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="10">
|
|
||||||
<CheckBox x:Name="cbEnableBookmarkPlugin" />
|
|
||||||
<TextBlock Text="Enable Bookmark Plugin" />
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem>
|
|
||||||
</TabControl>
|
</TabControl>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -57,26 +57,6 @@ namespace Wox
|
|||||||
UserSettingStorage.Instance.Save();
|
UserSettingStorage.Instance.Save();
|
||||||
};
|
};
|
||||||
|
|
||||||
cbEnablePythonPlugins.Checked += (o, e) =>
|
|
||||||
{
|
|
||||||
UserSettingStorage.Instance.EnablePythonPlugins = true;
|
|
||||||
UserSettingStorage.Instance.Save();
|
|
||||||
};
|
|
||||||
cbEnablePythonPlugins.Unchecked += (o, e) =>
|
|
||||||
{
|
|
||||||
UserSettingStorage.Instance.EnablePythonPlugins = false;
|
|
||||||
UserSettingStorage.Instance.Save();
|
|
||||||
};
|
|
||||||
|
|
||||||
cbEnableBookmarkPlugin.Checked += (o, e) => {
|
|
||||||
UserSettingStorage.Instance.EnableBookmarkPlugin = true;
|
|
||||||
UserSettingStorage.Instance.Save();
|
|
||||||
};
|
|
||||||
cbEnableBookmarkPlugin.Unchecked += (o, e) => {
|
|
||||||
UserSettingStorage.Instance.EnableBookmarkPlugin = false;
|
|
||||||
UserSettingStorage.Instance.Save();
|
|
||||||
};
|
|
||||||
|
|
||||||
cbLeaveCmdOpen.Checked += (o, e) => {
|
cbLeaveCmdOpen.Checked += (o, e) => {
|
||||||
UserSettingStorage.Instance.LeaveCmdOpen = true;
|
UserSettingStorage.Instance.LeaveCmdOpen = true;
|
||||||
UserSettingStorage.Instance.Save();
|
UserSettingStorage.Instance.Save();
|
||||||
@@ -188,9 +168,7 @@ namespace Wox
|
|||||||
themeComboBox.SelectedItem = UserSettingStorage.Instance.Theme;
|
themeComboBox.SelectedItem = UserSettingStorage.Instance.Theme;
|
||||||
cbReplaceWinR.IsChecked = UserSettingStorage.Instance.ReplaceWinR;
|
cbReplaceWinR.IsChecked = UserSettingStorage.Instance.ReplaceWinR;
|
||||||
lvCustomHotkey.ItemsSource = UserSettingStorage.Instance.CustomPluginHotkeys;
|
lvCustomHotkey.ItemsSource = UserSettingStorage.Instance.CustomPluginHotkeys;
|
||||||
cbEnablePythonPlugins.IsChecked = UserSettingStorage.Instance.EnablePythonPlugins;
|
|
||||||
cbStartWithWindows.IsChecked = File.Exists(woxLinkPath);
|
cbStartWithWindows.IsChecked = File.Exists(woxLinkPath);
|
||||||
cbEnableBookmarkPlugin.IsChecked = UserSettingStorage.Instance.EnableBookmarkPlugin;
|
|
||||||
cbLeaveCmdOpen.IsChecked = UserSettingStorage.Instance.LeaveCmdOpen;
|
cbLeaveCmdOpen.IsChecked = UserSettingStorage.Instance.LeaveCmdOpen;
|
||||||
cbHideWhenDeactive.IsChecked = UserSettingStorage.Instance.HideWhenDeactive;
|
cbHideWhenDeactive.IsChecked = UserSettingStorage.Instance.HideWhenDeactive;
|
||||||
|
|
||||||
@@ -210,7 +188,7 @@ namespace Wox
|
|||||||
PluginLoader.Plugins.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.ThirdParty)
|
PluginLoader.Plugins.AllPlugins.Where(o => o.Metadata.PluginType == PluginType.ThirdParty)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
featureBox.ItemsSource = features;
|
lbPlugins.ItemsSource = features;
|
||||||
|
|
||||||
slOpacity.Value = UserSettingStorage.Instance.Opacity;
|
slOpacity.Value = UserSettingStorage.Instance.Opacity;
|
||||||
CbOpacityMode.SelectedItem = UserSettingStorage.Instance.OpacityMode;
|
CbOpacityMode.SelectedItem = UserSettingStorage.Instance.OpacityMode;
|
||||||
@@ -450,10 +428,10 @@ namespace Wox
|
|||||||
PreviewMainPanel.Opacity = 1;
|
PreviewMainPanel.Opacity = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void featureBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void lbPlugins_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
ISettingProvider provider = null;
|
ISettingProvider provider = null;
|
||||||
var pair = featureBox.SelectedItem as PluginPair;
|
var pair = lbPlugins.SelectedItem as PluginPair;
|
||||||
if (pair != null)
|
if (pair != null)
|
||||||
{
|
{
|
||||||
provider = pair.Plugin as ISettingProvider;
|
provider = pair.Plugin as ISettingProvider;
|
||||||
@@ -472,9 +450,9 @@ namespace Wox
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
provider = featureBox.SelectedItem as ISettingProvider;
|
provider = lbPlugins.SelectedItem as ISettingProvider;
|
||||||
|
|
||||||
var sys = featureBox.SelectedItem as BaseSystemPlugin;
|
var sys = lbPlugins.SelectedItem as BaseSystemPlugin;
|
||||||
if (sys != null)
|
if (sys != null)
|
||||||
{
|
{
|
||||||
pluginTitle.Text = sys.Name;
|
pluginTitle.Text = sys.Name;
|
||||||
|
|||||||
Reference in New Issue
Block a user