<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls">

    <x:Double x:Key="DefaultIconSize">16</x:Double>
    <x:Double x:Key="SmallIconSize">12</x:Double>
    <Style x:Key="DefaultTextKeyVisualStyle" TargetType="controls: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" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:KeyVisual">
                    <Grid>
                        <Grid>
                            <Rectangle
                                x:Name="ContentHolder"
                                Height="{TemplateBinding Height}"
                                MinWidth="{TemplateBinding MinWidth}"
                                Fill="{TemplateBinding Background}"
                                RadiusX="4"
                                RadiusY="4"
                                Stroke="{TemplateBinding BorderBrush}"
                                StrokeThickness="{TemplateBinding BorderThickness}" />
                            <ContentPresenter
                                x:Name="KeyPresenter"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="Center"
                                Content="{TemplateBinding Content}"
                                FontSize="{TemplateBinding FontSize}"
                                FontWeight="{TemplateBinding FontWeight}"
                                Foreground="{TemplateBinding Foreground}" />
                        </Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="ContentHolder.Fill" Value="{ThemeResource AccentButtonBackgroundDisabled}" />
                                        <Setter Target="KeyPresenter.Foreground" Value="{ThemeResource AccentButtonForegroundDisabled}" />
                                        <Setter Target="ContentHolder.Stroke" Value="{ThemeResource AccentButtonBorderBrushDisabled}" />
                                        <!--<Setter Target="ContentHolder.StrokeThickness" Value="{TemplateBinding BorderThickness}" />-->
                                    </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>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style
        x:Key="SmallTextKeyVisualStyle"
        BasedOn="{StaticResource DefaultTextKeyVisualStyle}"
        TargetType="controls:KeyVisual">
        <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"
        BasedOn="{StaticResource DefaultTextKeyVisualStyle}"
        TargetType="controls:KeyVisual">
        <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"
        BasedOn="{StaticResource DefaultTextKeyVisualStyle}"
        TargetType="controls:KeyVisual">
        <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"
        BasedOn="{StaticResource DefaultTextKeyVisualStyle}"
        TargetType="controls:KeyVisual">
        <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"
        BasedOn="{StaticResource DefaultTextKeyVisualStyle}"
        TargetType="controls:KeyVisual">
        <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>

    <Style
        x:Key="OnlyTextKeyVisualStyle"
        BasedOn="{StaticResource DefaultTextKeyVisualStyle}"
        TargetType="controls:KeyVisual">
        <Setter Property="MinHeight" Value="12" />
        <Setter Property="MinWidth" Value="12" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="{ThemeResource ButtonForeground}" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
    </Style>

    <Style
        x:Key="OnlyIconKeyVisualStyle"
        BasedOn="{StaticResource DefaultTextKeyVisualStyle}"
        TargetType="controls:KeyVisual">
        <Setter Property="MinHeight" Value="10" />
        <Setter Property="MinWidth" Value="10" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="{ThemeResource ButtonForeground}" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="Padding" Value="0,0,0,3" />
        <!--<Setter Property="FontSize" Value="9" />-->
        <Setter Property="HorizontalContentAlignment" Value="Center" />
    </Style>
</ResourceDictionary>