ux: new style for ChangeViewModeSwitcher

This commit is contained in:
leo 2024-05-29 17:31:01 +08:00
parent fdc41515b7
commit 7154221946
2 changed files with 10 additions and 4 deletions

View file

@ -60,6 +60,12 @@
</Animation>
</Style.Animations>
</Style>
<Style Selector="Path.change_mode_switcher_icon">
<Setter Property="Fill" Value="{DynamicResource Brush.FG2}"/>
</Style>
<Style Selector="Button:pointerover Path.change_mode_switcher_icon">
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}"/>
</Style>
<Style Selector="TextBlock">
<Setter Property="HorizontalAlignment" Value="Left"/>

View file

@ -14,22 +14,22 @@
<MenuFlyout Placement="BottomEdgeAlignedLeft">
<MenuItem Header="{DynamicResource Text.ChangeDisplayMode.List}" Command="{Binding SwitchMode}" CommandParameter="{x:Static m:ChangeViewMode.List}">
<MenuItem.Icon>
<Path Width="12" Height="12" Fill="{DynamicResource Brush.FG2}" Data="{StaticResource Icons.List}"/>
<Path Width="12" Height="12" Data="{StaticResource Icons.List}"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="{DynamicResource Text.ChangeDisplayMode.Grid}" Command="{Binding SwitchMode}" CommandParameter="{x:Static m:ChangeViewMode.Grid}">
<MenuItem.Icon>
<Path Width="12" Height="12" Fill="{DynamicResource Brush.FG2}" Data="{StaticResource Icons.Grid}"/>
<Path Width="12" Height="12" Data="{StaticResource Icons.Grid}"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="{DynamicResource Text.ChangeDisplayMode.Tree}" Command="{Binding SwitchMode}" CommandParameter="{x:Static m:ChangeViewMode.Tree}">
<MenuItem.Icon>
<Path Width="12" Height="12" Fill="{DynamicResource Brush.FG2}" Data="{StaticResource Icons.Tree}"/>
<Path Width="12" Height="12" Data="{StaticResource Icons.Tree}"/>
</MenuItem.Icon>
</MenuItem>
</MenuFlyout>
</Button.Flyout>
<Path Stretch="Uniform" Fill="{DynamicResource Brush.FG2}" Data="{Binding ViewMode, Converter={x:Static c:ChangeViewModeConverters.ToIcon}}"/>
<Path Classes="change_mode_switcher_icon" Stretch="Uniform" Data="{Binding ViewMode, Converter={x:Static c:ChangeViewModeConverters.ToIcon}}"/>
</Button>
</UserControl>