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