mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Redesgin settings panel for websearch plugin
This commit is contained in:
parent
16b45d38be
commit
975d6eefdd
1 changed files with 39 additions and 43 deletions
|
|
@ -35,16 +35,17 @@
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid Margin="0,4,0,0">
|
<Grid Margin="{StaticResource SettingPanelMargin}">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition Height="56" />
|
<RowDefinition Height="56" />
|
||||||
|
<RowDefinition />
|
||||||
<RowDefinition Height="50" />
|
<RowDefinition Height="50" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<ListView
|
<ListView
|
||||||
x:Name="SearchSourcesListView"
|
x:Name="SearchSourcesListView"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Margin="18,18,18,0"
|
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
|
||||||
BorderBrush="DarkGray"
|
BorderBrush="DarkGray"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
GridViewColumnHeader.Click="SortByColumn"
|
GridViewColumnHeader.Click="SortByColumn"
|
||||||
|
|
@ -60,7 +61,7 @@
|
||||||
<Image
|
<Image
|
||||||
Width="20"
|
Width="20"
|
||||||
Height="20"
|
Height="20"
|
||||||
Margin="6,0,0,0"
|
Margin="6 0 0 0"
|
||||||
Source="{Binding Path=IconPath}" />
|
Source="{Binding Path=IconPath}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GridViewColumn.CellTemplate>
|
</GridViewColumn.CellTemplate>
|
||||||
|
|
@ -69,11 +70,11 @@
|
||||||
<GridViewColumn
|
<GridViewColumn
|
||||||
Width="130"
|
Width="130"
|
||||||
DisplayMemberBinding="{Binding ActionKeyword}"
|
DisplayMemberBinding="{Binding ActionKeyword}"
|
||||||
Header="{DynamicResource flowlauncher_plugin_websearch_action_keyword}"/>
|
Header="{DynamicResource flowlauncher_plugin_websearch_action_keyword}" />
|
||||||
<GridViewColumn
|
<GridViewColumn
|
||||||
Width="350"
|
Width="239"
|
||||||
DisplayMemberBinding="{Binding Title}"
|
DisplayMemberBinding="{Binding Title}"
|
||||||
Header="{DynamicResource flowlauncher_plugin_websearch_title}"/>
|
Header="{DynamicResource flowlauncher_plugin_websearch_title}" />
|
||||||
<GridViewColumn Width="140" Header="{DynamicResource flowlauncher_plugin_websearch_enable}">
|
<GridViewColumn Width="140" Header="{DynamicResource flowlauncher_plugin_websearch_enable}">
|
||||||
<GridViewColumn.CellTemplate>
|
<GridViewColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
|
|
@ -97,57 +98,52 @@
|
||||||
</ListView>
|
</ListView>
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
|
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Button
|
<Button
|
||||||
Width="100"
|
Width="100"
|
||||||
Margin="10"
|
Margin="{StaticResource SettingPanelItemLeftMargin}"
|
||||||
Click="OnDeleteSearchSearchClick"
|
Click="OnDeleteSearchSearchClick"
|
||||||
Content="{DynamicResource flowlauncher_plugin_websearch_delete}" />
|
Content="{DynamicResource flowlauncher_plugin_websearch_delete}" />
|
||||||
<Button
|
<Button
|
||||||
Width="100"
|
Width="100"
|
||||||
Margin="10"
|
Margin="{StaticResource SettingPanelItemLeftMargin}"
|
||||||
Click="OnEditSearchSourceClick"
|
Click="OnEditSearchSourceClick"
|
||||||
Content="{DynamicResource flowlauncher_plugin_websearch_edit}" />
|
Content="{DynamicResource flowlauncher_plugin_websearch_edit}" />
|
||||||
<Button
|
<Button
|
||||||
Width="100"
|
Width="100"
|
||||||
Margin="10,10,18,10"
|
Margin="{StaticResource SettingPanelItemLeftMargin}"
|
||||||
Click="OnAddSearchSearchClick"
|
Click="OnAddSearchSearchClick"
|
||||||
Content="{DynamicResource flowlauncher_plugin_websearch_add}" />
|
Content="{DynamicResource flowlauncher_plugin_websearch_add}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Border
|
<Separator Grid.Row="2" Style="{StaticResource SettingPanelSeperatorStyle}" />
|
||||||
Grid.Row="2"
|
<DockPanel
|
||||||
Margin="0,0,0,0"
|
Grid.Row="3"
|
||||||
HorizontalAlignment="Stretch"
|
Margin="{StaticResource SettingPanelItemTopBottomMargin}"
|
||||||
BorderBrush="{DynamicResource Color03B}"
|
HorizontalAlignment="Right">
|
||||||
BorderThickness="0,1,0,0">
|
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
|
||||||
<DockPanel HorizontalAlignment="Right">
|
<Label
|
||||||
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
|
HorizontalAlignment="Right"
|
||||||
<Label
|
VerticalAlignment="Center"
|
||||||
Margin="14,0,10,0"
|
Content="{DynamicResource flowlauncher_plugin_websearch_enable_suggestion_provider}" />
|
||||||
HorizontalAlignment="Right"
|
<ComboBox
|
||||||
VerticalAlignment="Center"
|
Height="30"
|
||||||
Content="{DynamicResource flowlauncher_plugin_websearch_enable_suggestion_provider}" />
|
Margin="{StaticResource SettingPanelItemLeftMargin}"
|
||||||
<ComboBox
|
VerticalAlignment="Center"
|
||||||
Height="30"
|
FontSize="11"
|
||||||
Margin="0,0,20,0"
|
IsEnabled="{Binding ElementName=EnableSuggestion, Path=IsChecked}"
|
||||||
VerticalAlignment="Center"
|
ItemsSource="{Binding Settings.Suggestions}"
|
||||||
FontSize="11"
|
SelectedItem="{Binding Settings.SelectedSuggestion}" />
|
||||||
IsEnabled="{Binding ElementName=EnableSuggestion, Path=IsChecked}"
|
<CheckBox
|
||||||
ItemsSource="{Binding Settings.Suggestions}"
|
Name="EnableSuggestion"
|
||||||
SelectedItem="{Binding Settings.SelectedSuggestion}" />
|
Margin="{StaticResource SettingPanelItemLeftMargin}"
|
||||||
<Label
|
HorizontalAlignment="Right"
|
||||||
Margin="0,0,10,0"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Right"
|
Content="{DynamicResource flowlauncher_plugin_websearch_enable_suggestion}"
|
||||||
VerticalAlignment="Center"
|
IsChecked="{Binding Settings.EnableSuggestion}" />
|
||||||
Content="{DynamicResource flowlauncher_plugin_websearch_enable_suggestion}" />
|
</StackPanel>
|
||||||
<CheckBox
|
<!-- Not sure why binding IsEnabled directly to Settings.EnableWebSearchSuggestion is not working -->
|
||||||
Name="EnableSuggestion"
|
</DockPanel>
|
||||||
Margin="0,0,8,0"
|
|
||||||
IsChecked="{Binding Settings.EnableSuggestion}" />
|
|
||||||
</StackPanel>
|
|
||||||
<!-- Not sure why binding IsEnabled directly to Settings.EnableWebSearchSuggestion is not working -->
|
|
||||||
</DockPanel>
|
|
||||||
</Border>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
Loading…
Reference in a new issue