Theme config context menu

This commit is contained in:
Ray Berezowski
2026-06-02 22:12:43 -04:00
parent 28689bbd16
commit 3bd58af9d9

View File

@@ -168,6 +168,63 @@
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="ContextMenu">
<Setter Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="2"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ContextMenu">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<ItemsPresenter/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="MenuItem">
<Setter Property="Background" Value="{DynamicResource AppSurfaceBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="Padding" Value="10,7"/>
<Setter Property="MinWidth" Value="190"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="MenuItem">
<Border x:Name="MenuItemBorder"
Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}">
<ContentPresenter ContentSource="Header"
RecognizesAccessKey="True"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsHighlighted" Value="True">
<Setter TargetName="MenuItemBorder" Property="Background" Value="{DynamicResource AppAccentBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource AppSelectedTextBrush}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.55"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Separator">
<Setter Property="Margin" Value="6,4"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Separator">
<Border Height="1" Background="{DynamicResource AppBorderBrush}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="GroupBox">
<Setter Property="Foreground" Value="{DynamicResource AppTextBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppBorderBrush}"/>