mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
74 lines
4.1 KiB
XML
74 lines
4.1 KiB
XML
<UserControl
|
|
x:Class="Flow.Launcher.Resources.Controls.HotkeyDisplay"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:Flow.Launcher.Resources.Controls"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
mc:Ignorable="d">
|
|
<Grid>
|
|
<Button
|
|
Width="Auto"
|
|
FontSize="13"
|
|
FontWeight="Bold"
|
|
Foreground="{DynamicResource Color01B}">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border
|
|
x:Name="ButtonBorder"
|
|
BorderBrush="{DynamicResource ButtonInsideBorder}"
|
|
CornerRadius="5">
|
|
<Border.Style>
|
|
<Style TargetType="{x:Type Border}">
|
|
<Setter Property="Background" Value="{DynamicResource Color12B}" />
|
|
<Setter Property="Padding" Value="5,0,5,0" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:HotkeyDisplay}}" Value="Small">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="Padding" Value="0,0,0,0" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
<Button.Content>
|
|
<ItemsControl x:Name="KeysControl">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border BorderThickness="1" CornerRadius="5">
|
|
<Border.Style>
|
|
<Style TargetType="{x:Type Border}">
|
|
<Setter Property="Background" Value="{DynamicResource SystemControlBackgroundBaseLowBrush}" />
|
|
<Setter Property="Padding" Value="10,5,10,5" />
|
|
<Setter Property="Margin" Value="2,5,2,5" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:HotkeyDisplay}}" Value="Small">
|
|
<Setter Property="Background" Value="{DynamicResource AccentButtonBackground}" />
|
|
<Setter Property="Padding" Value="10,5,10,5" />
|
|
<Setter Property="Margin" Value="2,0,2,0" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
<TextBlock Foreground="{DynamicResource AccentButtonForegroundPointerOver}" Text="{Binding}" />
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Button.Content>
|
|
</Button>
|
|
</Grid>
|
|
</UserControl>
|