mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
140 lines
6.4 KiB
XML
140 lines
6.4 KiB
XML
<ui:Page
|
|
x:Class="Flow.Launcher.SettingPages.Views.SettingsPanePlugins"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:ui="http://schemas.modernwpf.com/2019"
|
|
xmlns:viewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels"
|
|
Title="Plugins"
|
|
d:DataContext="{d:DesignInstance viewModels:SettingsPanePluginsViewModel}"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
FocusManager.FocusedElement="{Binding ElementName=PluginFilterTextbox}"
|
|
KeyDown="SettingsPanePlugins_OnKeyDown"
|
|
mc:Ignorable="d">
|
|
<ui:Page.Resources>
|
|
<CollectionViewSource
|
|
x:Key="PluginCollectionView"
|
|
Filter="PluginCollectionView_OnFilter"
|
|
Source="{Binding PluginViewModels}" />
|
|
</ui:Page.Resources>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="73" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<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" />
|
|
<StackPanel
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Right"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="0 0 6 0"
|
|
VerticalAlignment="Center"
|
|
FontSize="14"
|
|
Foreground="{DynamicResource Color15B}"
|
|
Text="{DynamicResource FilterComboboxLabel}" />
|
|
<ComboBox
|
|
x:Name="DisplayModeComboBox"
|
|
Width="Auto"
|
|
Height="34"
|
|
MinWidth="150"
|
|
MaxWidth="150"
|
|
Margin="0 0 4 0"
|
|
HorizontalContentAlignment="Left"
|
|
Background="{DynamicResource Color00B}"
|
|
DisplayMemberPath="Display"
|
|
ItemsSource="{Binding DisplayModes}"
|
|
SelectedValue="{Binding SelectedDisplayMode, Mode=TwoWay}"
|
|
SelectedValuePath="Value" />
|
|
<Button
|
|
Width="34"
|
|
Height="34"
|
|
Margin="0 0 20 0"
|
|
Command="{Binding OpenHelperCommand}"
|
|
CommandParameter="{Binding RelativeSource={RelativeSource Self}}"
|
|
FontSize="14">
|
|
<ui:FontIcon FontSize="14" Glyph="" />
|
|
</Button>
|
|
<TextBox
|
|
Name="PluginFilterTextbox"
|
|
Width="150"
|
|
Height="34"
|
|
Margin="0 0 26 0"
|
|
ContextMenu="{StaticResource TextBoxContextMenu}"
|
|
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>
|
|
</StackPanel>
|
|
</DockPanel>
|
|
|
|
<Border
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Background="{DynamicResource Color01B}">
|
|
<ListBox
|
|
Margin="5 0 7 10"
|
|
Background="{DynamicResource Color01B}"
|
|
FontSize="14"
|
|
ItemContainerStyle="{StaticResource PluginList}"
|
|
ItemsSource="{Binding Source={StaticResource PluginCollectionView}}"
|
|
ScrollViewer.CanContentScroll="False"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
SnapsToDevicePixels="True"
|
|
Style="{DynamicResource PluginListStyle}"
|
|
VirtualizingPanel.ScrollUnit="Pixel"
|
|
VirtualizingStackPanel.IsVirtualizing="True"
|
|
VirtualizingStackPanel.VirtualizationMode="Recycling">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<cc:InstalledPluginDisplay />
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Border>
|
|
</Grid>
|
|
</ui:Page>
|