Fix NavMenuItem selected+focused state showing hover appearance instead of selected (#847)

* Initial plan

* Fix NavMenuItem focus and selected visual appearance in Semi theme

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>
This commit is contained in:
Copilot
2025-12-30 16:54:12 +08:00
committed by GitHub
parent 445c8217c8
commit 0d7c97a7dd

View File

@@ -168,6 +168,10 @@
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemSelectedForeground}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemSelectedPointeroverBackground}" />
</Style>
<Style Selector="^:focus">
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemSelectedForeground}" />
<Setter Property="Background" Value="{DynamicResource ListBoxItemSelectedBackground}" />
</Style>
</Style>
<Style Selector="^:vertical-collapsed /template/ ItemsPresenter#PART_ItemsPresenter">
<Setter Property="Height" Value="0" />
@@ -195,6 +199,12 @@
<Style Selector="^:focus /template/ ContentPresenter#PART_HeaderPresenter">
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemPointeroverForeground}" />
</Style>
<Style Selector="^:selected:focus /template/ Border#PART_Border">
<Setter Property="Background" Value="{DynamicResource ListBoxItemSelectedBackground}" />
</Style>
<Style Selector="^:selected:focus /template/ ContentPresenter#PART_HeaderPresenter">
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemSelectedForeground}" />
</Style>
<Style Selector="^:horizontal-collapsed:first-level">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Style Selector="^ /template/ Border#PART_Border">