mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Cleanup SettingsPanePlugins
This commit is contained in:
parent
8ca4e3a572
commit
f6eaf5a3ab
2 changed files with 71 additions and 78 deletions
|
|
@ -5,6 +5,7 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:ui="http://schemas.modernwpf.com/2019"
|
||||
xmlns:viewModel="clr-namespace:Flow.Launcher.ViewModel"
|
||||
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance viewModel:PluginViewModel}"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
|
|
@ -16,7 +17,7 @@
|
|||
SnapsToDevicePixels="True"
|
||||
Style="{StaticResource ExpanderStyle1}">
|
||||
<Expander.Header>
|
||||
<Border Padding="0,12,0,12">
|
||||
<Border Padding="0 12">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="36" MinWidth="36" />
|
||||
|
|
@ -28,14 +29,14 @@
|
|||
Width="32"
|
||||
Height="32"
|
||||
Source="{Binding Image, IsAsync=True}" />
|
||||
<StackPanel Grid.Column="1" Margin="16,0,14,0">
|
||||
<StackPanel Grid.Column="1" Margin="16 0 14 0">
|
||||
<TextBlock
|
||||
Foreground="{DynamicResource Color05B}"
|
||||
Text="{Binding PluginPair.Metadata.Name}"
|
||||
TextWrapping="Wrap"
|
||||
ToolTip="{Binding PluginPair.Metadata.Version}" />
|
||||
<TextBlock
|
||||
Margin="0,2,0,0"
|
||||
Margin="0 2 0 0"
|
||||
Foreground="{DynamicResource Color04B}"
|
||||
FontSize="12"
|
||||
Text="{Binding PluginPair.Metadata.Description}"
|
||||
|
|
@ -43,14 +44,14 @@
|
|||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<TextBlock
|
||||
Margin="0,0,8,0"
|
||||
Margin="0 0 8 0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="12"
|
||||
Foreground="{DynamicResource Color08B}"
|
||||
Text="{DynamicResource priority}" />
|
||||
<Button
|
||||
x:Name="PriorityButton"
|
||||
Margin="0,0,22,0"
|
||||
Margin="0 0 22 0"
|
||||
VerticalAlignment="Center"
|
||||
Command="{Binding EditPluginPriorityCommand}"
|
||||
Content="{Binding Priority, UpdateSourceTrigger=PropertyChanged}"
|
||||
|
|
@ -64,7 +65,7 @@
|
|||
</Button.Resources>
|
||||
<Button.Style>
|
||||
<Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="Button">
|
||||
<Setter Property="Padding" Value="12,8,12,8" />
|
||||
<Setter Property="Padding" Value="12 8" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="FontWeight" Value="DemiBold" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
||||
|
|
@ -97,13 +98,13 @@
|
|||
Height="52"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
BorderThickness="0,1,0,0"
|
||||
BorderThickness="0 1 0 0"
|
||||
CornerRadius="0"
|
||||
Style="{DynamicResource SettingGroupBox}"
|
||||
Visibility="{Binding ActionKeywordsVisibility}">
|
||||
<DockPanel Margin="22,0,18,0" VerticalAlignment="Center">
|
||||
<DockPanel Margin="22 0 18 0" VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
Margin="48,0,10,0"
|
||||
Margin="48 0 10 0"
|
||||
DockPanel.Dock="Left"
|
||||
Style="{StaticResource Glyph}">
|
||||

|
||||
|
|
@ -117,7 +118,7 @@
|
|||
<Button
|
||||
Width="100"
|
||||
Height="34"
|
||||
Margin="5,0,0,0"
|
||||
Margin="5 0 0 0"
|
||||
HorizontalAlignment="Right"
|
||||
Command="{Binding SetActionKeywordsCommand}"
|
||||
Content="{Binding ActionKeywordsText}"
|
||||
|
|
@ -130,7 +131,7 @@
|
|||
</Border>
|
||||
|
||||
<Border
|
||||
BorderThickness="0,1,0,0"
|
||||
BorderThickness="0 1 0 0"
|
||||
BorderBrush="{DynamicResource Color03B}"
|
||||
Background="{DynamicResource Color00B}">
|
||||
<Border.Style>
|
||||
|
|
@ -153,7 +154,7 @@
|
|||
Margin="0"
|
||||
Padding="15 10"
|
||||
VerticalAlignment="Center"
|
||||
BorderThickness="0,1,0,0"
|
||||
BorderThickness="0 1 0 0"
|
||||
CornerRadius="0 0 5 5"
|
||||
Style="{DynamicResource SettingGroupBox}">
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
|
|
@ -170,7 +171,7 @@
|
|||
Foreground="{DynamicResource PluginInfoColor}"
|
||||
Text="{Binding PluginPair.Metadata.Author}" />
|
||||
<TextBlock
|
||||
Margin="10,0,0,0"
|
||||
Margin="10 0 0 0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="11"
|
||||
Foreground="{DynamicResource PluginInfoColor}"
|
||||
|
|
@ -184,7 +185,7 @@
|
|||
ToolTip="{Binding InitAndQueryTime}"
|
||||
ToolTipService.InitialShowDelay="500" />
|
||||
<TextBlock
|
||||
Margin="5 0 5 0"
|
||||
Margin="5 0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="11"
|
||||
Foreground="{DynamicResource PluginInfoColor}"
|
||||
|
|
|
|||
|
|
@ -23,81 +23,73 @@
|
|||
<RowDefinition Height="73" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
Grid.Row="0"
|
||||
Padding="5,18,0,0"
|
||||
HorizontalAlignment="Stretch">
|
||||
<DockPanel>
|
||||
<TextBlock
|
||||
Margin="0,5,0,0"
|
||||
DockPanel.Dock="Left"
|
||||
FontSize="30"
|
||||
Style="{StaticResource PageTitle}"
|
||||
Text="{DynamicResource plugins}"
|
||||
TextAlignment="Left" />
|
||||
<TextBox
|
||||
Name="PluginFilterTextbox"
|
||||
Width="150"
|
||||
Height="34"
|
||||
Margin="0,5,26,0"
|
||||
HorizontalAlignment="Right"
|
||||
ContextMenu="{StaticResource TextBoxContextMenu}"
|
||||
DockPanel.Dock="Right"
|
||||
FontSize="14"
|
||||
Text="{Binding FilterText, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextAlignment="Left"
|
||||
ToolTip="{DynamicResource searchpluginToolTip}"
|
||||
ToolTipService.InitialShowDelay="200"
|
||||
ToolTipService.Placement="Top">
|
||||
<TextBox.Style>
|
||||
<Style BasedOn="{StaticResource DefaultTextBoxStyle}" TargetType="TextBox">
|
||||
<Style.Resources>
|
||||
<VisualBrush
|
||||
x:Key="CueBannerBrush"
|
||||
AlignmentX="Left"
|
||||
AlignmentY="Center"
|
||||
Stretch="None">
|
||||
<VisualBrush.Visual>
|
||||
<Label
|
||||
Padding="10,0,0,0"
|
||||
Content="{DynamicResource searchplugin}"
|
||||
Foreground="{DynamicResource CustomContextDisabled}" />
|
||||
</VisualBrush.Visual>
|
||||
</VisualBrush>
|
||||
</Style.Resources>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Text" Value="{x:Static sys:String.Empty}">
|
||||
<Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Text" Value="{x:Null}">
|
||||
<Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsKeyboardFocused" Value="True">
|
||||
<Setter Property="Background" Value="{DynamicResource Color02B}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBox.Style>
|
||||
</TextBox>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Padding="0,0,0,0"
|
||||
Background="{DynamicResource Color01B}">
|
||||
<DockPanel Grid.Row="0" Margin="5 18 0 0">
|
||||
<TextBlock
|
||||
Margin="0 5 0 0"
|
||||
DockPanel.Dock="Left"
|
||||
FontSize="30"
|
||||
Style="{StaticResource PageTitle}"
|
||||
Text="{DynamicResource plugins}"
|
||||
TextAlignment="Left" />
|
||||
<TextBox
|
||||
Name="PluginFilterTextbox"
|
||||
Width="150"
|
||||
Height="34"
|
||||
Margin="0 5 26 0"
|
||||
HorizontalAlignment="Right"
|
||||
ContextMenu="{StaticResource TextBoxContextMenu}"
|
||||
DockPanel.Dock="Right"
|
||||
FontSize="14"
|
||||
Text="{Binding FilterText, UpdateSourceTrigger=PropertyChanged}"
|
||||
TextAlignment="Left"
|
||||
ToolTip="{DynamicResource searchpluginToolTip}"
|
||||
ToolTipService.InitialShowDelay="200"
|
||||
ToolTipService.Placement="Top">
|
||||
<TextBox.Style>
|
||||
<Style BasedOn="{StaticResource DefaultTextBoxStyle}" TargetType="TextBox">
|
||||
<Style.Resources>
|
||||
<VisualBrush
|
||||
x:Key="CueBannerBrush"
|
||||
AlignmentX="Left"
|
||||
AlignmentY="Center"
|
||||
Stretch="None">
|
||||
<VisualBrush.Visual>
|
||||
<Label
|
||||
Padding="10 0 0 0"
|
||||
Content="{DynamicResource searchplugin}"
|
||||
Foreground="{DynamicResource CustomContextDisabled}" />
|
||||
</VisualBrush.Visual>
|
||||
</VisualBrush>
|
||||
</Style.Resources>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Text" Value="{x:Static sys:String.Empty}">
|
||||
<Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Text" Value="{x:Null}">
|
||||
<Setter Property="Background" Value="{StaticResource CueBannerBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsKeyboardFocused" Value="True">
|
||||
<Setter Property="Background" Value="{DynamicResource Color02B}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBox.Style>
|
||||
</TextBox>
|
||||
</DockPanel>
|
||||
<Border Grid.Row="1" Grid.Column="0" Background="{DynamicResource Color01B}">
|
||||
<ListBox
|
||||
Margin="5 0 7 10"
|
||||
Background="{DynamicResource Color01B}"
|
||||
FontSize="14"
|
||||
ItemsSource="{Binding FilteredPluginViewModels}"
|
||||
ItemContainerStyle="{StaticResource PluginList}"
|
||||
ScrollViewer.CanContentScroll="False"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
SelectedItem="{Binding SelectedPlugin}"
|
||||
SnapsToDevicePixels="True"
|
||||
Style="{DynamicResource PluginListStyle}"
|
||||
VirtualizingPanel.ScrollUnit="Pixel"
|
||||
VirtualizingStackPanel.IsVirtualizing="False"
|
||||
VirtualizingStackPanel.IsVirtualizing="True"
|
||||
VirtualizingStackPanel.VirtualizationMode="Recycling">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
|
|
|
|||
Loading…
Reference in a new issue