2021-04-05 10:52:44 +02:00
|
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Controls">
|
|
|
|
|
|
2021-09-06 20:21:18 +02:00
|
|
|
<x:Double x:Key="DefaultIconSize">16</x:Double>
|
|
|
|
|
<x:Double x:Key="SmallIconSize">12</x:Double>
|
|
|
|
|
<Style x:Key="DefaultTextKeyVisualStyle" TargetType="local:KeyVisual">
|
|
|
|
|
<Setter Property="MinWidth" Value="56" />
|
|
|
|
|
<Setter Property="MinHeight" Value="48" />
|
|
|
|
|
<Setter Property="Background" Value="{ThemeResource AccentButtonBackground}" />
|
|
|
|
|
<Setter Property="Foreground" Value="{ThemeResource AccentButtonForeground}" />
|
|
|
|
|
<Setter Property="BorderBrush" Value="{ThemeResource AccentButtonBorderBrush}" />
|
|
|
|
|
<Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}" />
|
|
|
|
|
<Setter Property="Padding" Value="16,8,16,8" />
|
|
|
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
|
|
<Setter Property="FontSize" Value="18" />
|
2021-04-05 10:52:44 +02:00
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="local:KeyVisual">
|
2021-09-06 20:21:18 +02:00
|
|
|
<Grid>
|
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
|
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
|
|
|
<VisualState x:Name="Normal"/>
|
|
|
|
|
<VisualState x:Name="Disabled">
|
|
|
|
|
<VisualState.Setters>
|
2021-09-19 16:22:39 +02:00
|
|
|
<Setter Target="ContentHolder.Fill" Value="{ThemeResource AccentButtonBackgroundDisabled}" />
|
2021-09-06 20:21:18 +02:00
|
|
|
<Setter Target="KeyPresenter.Foreground" Value="{ThemeResource AccentButtonForegroundDisabled}" />
|
|
|
|
|
<Setter Target="ContentHolder.Stroke" Value="{ThemeResource AccentButtonBorderBrushDisabled}" />
|
2021-09-19 16:22:39 +02:00
|
|
|
<!--<Setter Target="ContentHolder.StrokeThickness" Value="{TemplateBinding BorderThickness}" />-->
|
2021-09-06 20:21:18 +02:00
|
|
|
</VisualState.Setters>
|
|
|
|
|
</VisualState>
|
|
|
|
|
</VisualStateGroup>
|
|
|
|
|
<VisualStateGroup x:Name="StateStates">
|
|
|
|
|
<VisualState x:Name="Default"/>
|
|
|
|
|
<VisualState x:Name="Error">
|
|
|
|
|
<VisualState.Setters>
|
|
|
|
|
<Setter Target="ContentHolder.Fill" Value="{ThemeResource InfoBarErrorSeverityBackgroundBrush}" />
|
|
|
|
|
<Setter Target="KeyPresenter.Foreground" Value="{ThemeResource InfoBarErrorSeverityIconBackground}" />
|
|
|
|
|
<Setter Target="ContentHolder.Stroke" Value="{ThemeResource InfoBarErrorSeverityIconBackground}" />
|
|
|
|
|
<Setter Target="ContentHolder.StrokeThickness" Value="2" />
|
|
|
|
|
</VisualState.Setters>
|
|
|
|
|
</VisualState>
|
|
|
|
|
</VisualStateGroup>
|
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
|
<Grid>
|
|
|
|
|
<Rectangle x:Name="ContentHolder"
|
|
|
|
|
Fill="{TemplateBinding Background}"
|
|
|
|
|
Stroke="{TemplateBinding BorderBrush}"
|
|
|
|
|
StrokeThickness="{TemplateBinding BorderThickness}"
|
|
|
|
|
RadiusX="4"
|
|
|
|
|
RadiusY="4"
|
|
|
|
|
Height="{TemplateBinding Height}"
|
|
|
|
|
MinWidth="{TemplateBinding MinWidth}"/>
|
|
|
|
|
<ContentPresenter x:Name="KeyPresenter"
|
|
|
|
|
FontWeight="{TemplateBinding FontWeight}"
|
|
|
|
|
Foreground="{TemplateBinding Foreground}"
|
|
|
|
|
Content="{TemplateBinding Content}"
|
|
|
|
|
Margin="{TemplateBinding Padding}"
|
|
|
|
|
FontSize="{TemplateBinding FontSize}"
|
|
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
2021-04-05 10:52:44 +02:00
|
|
|
VerticalAlignment="Center" />
|
2021-09-06 20:21:18 +02:00
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
2021-04-05 10:52:44 +02:00
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
2021-09-06 20:21:18 +02:00
|
|
|
<Style x:Key="SmallTextKeyVisualStyle" TargetType="local:KeyVisual" BasedOn="{StaticResource DefaultTextKeyVisualStyle}">
|
|
|
|
|
<Setter Property="MinWidth" Value="40" />
|
|
|
|
|
<Setter Property="Height" Value="36" />
|
|
|
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
|
|
|
<Setter Property="Padding" Value="12,0,12,2" />
|
|
|
|
|
<Setter Property="FontSize" Value="14" />
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style x:Key="SmallOutlineTextKeyVisualStyle" TargetType="local:KeyVisual" BasedOn="{StaticResource DefaultTextKeyVisualStyle}">
|
|
|
|
|
<Setter Property="MinWidth" Value="40" />
|
|
|
|
|
<Setter Property="Background" Value="{ThemeResource ButtonBackground}" />
|
|
|
|
|
<Setter Property="Foreground" Value="{ThemeResource ButtonForeground}" />
|
|
|
|
|
<Setter Property="BorderBrush" Value="{ThemeResource ButtonBorderBrush}" />
|
|
|
|
|
<Setter Property="Height" Value="36" />
|
|
|
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
|
|
|
<Setter Property="Padding" Value="8,0,8,2" />
|
|
|
|
|
<Setter Property="FontSize" Value="13" />
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Style x:Key="DefaultIconKeyVisualStyle" TargetType="local:KeyVisual" BasedOn="{StaticResource DefaultTextKeyVisualStyle}">
|
|
|
|
|
<Setter Property="MinWidth" Value="56" />
|
|
|
|
|
<Setter Property="MinHeight" Value="48" />
|
|
|
|
|
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
|
|
|
|
|
<Setter Property="Padding" Value="16,8,16,8" />
|
|
|
|
|
<Setter Property="FontSize" Value="14" />
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style x:Key="SmallIconKeyVisualStyle" TargetType="local:KeyVisual" BasedOn="{StaticResource DefaultTextKeyVisualStyle}">
|
|
|
|
|
<Setter Property="MinWidth" Value="40" />
|
|
|
|
|
<Setter Property="Height" Value="36" />
|
|
|
|
|
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
|
|
|
|
|
<Setter Property="FontWeight" Value="Normal" />
|
|
|
|
|
<Setter Property="Padding" Value="0" />
|
|
|
|
|
<Setter Property="FontSize" Value="10" />
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style x:Key="SmallOutlineIconKeyVisualStyle" TargetType="local:KeyVisual" BasedOn="{StaticResource DefaultTextKeyVisualStyle}">
|
|
|
|
|
<Setter Property="MinWidth" Value="40" />
|
|
|
|
|
<Setter Property="Background" Value="{ThemeResource ButtonBackground}" />
|
|
|
|
|
<Setter Property="Foreground" Value="{ThemeResource ButtonForeground}" />
|
|
|
|
|
<Setter Property="BorderBrush" Value="{ThemeResource ButtonBorderBrush}" />
|
|
|
|
|
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
|
|
|
|
|
<Setter Property="Height" Value="36" />
|
|
|
|
|
<Setter Property="FontWeight" Value="SemiBold" />
|
|
|
|
|
<Setter Property="Padding" Value="0" />
|
|
|
|
|
<Setter Property="FontSize" Value="9" />
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
|
|
</Style>
|
2021-04-05 10:52:44 +02:00
|
|
|
</ResourceDictionary>
|