Skip to content

Commit aaf3a31

Browse files
committed
Fix focus style.
1 parent 3d98162 commit aaf3a31

File tree

6 files changed

+18
-16
lines changed

6 files changed

+18
-16
lines changed

SuperLauncher/ModernLauncherContextMenu.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
</WindowChrome.WindowChrome>
3535
<Grid Background="{DynamicResource PanelColorBrush}">
3636
<Grid x:Name="Grid" Background="{DynamicResource AcrylicNoise}">
37-
<Frame Opacity="0" x:Name="Frame" Margin="3,3,3,3" />
37+
<Frame Focusable="False" Opacity="0" x:Name="Frame" Margin="3,3,3,3" />
3838
</Grid>
3939
</Grid>
4040
</Window>

SuperLauncher/ModernLauncherContextMenuMain.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:local="clr-namespace:SuperLauncher"
77
x:Class="SuperLauncher.ModernLauncherContextMenuMain"
8-
mc:Ignorable="d"
8+
mc:Ignorable="d"
99
Loaded="Page_Loaded"
1010
Unloaded="Page_Unloaded" >
1111
<Page.Resources>

SuperLauncher/Themes/Controls/WinUIButton.xaml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
11
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
2-
<!-- FocusVisual -->
3-
<Style x:Key="ButtonFocusVisual">
4-
<Setter Property="Control.Template">
5-
<Setter.Value>
6-
<ControlTemplate>
7-
<Border>
8-
<Rectangle Margin="2" StrokeThickness="1" Stroke="#60000000" StrokeDashArray="1 2" />
9-
</Border>
10-
</ControlTemplate>
11-
</Setter.Value>
12-
</Setter>
13-
</Style>
14-
<!-- Button -->
152
<Style TargetType="Button">
163
<Setter Property="SnapsToDevicePixels" Value="true" />
174
<Setter Property="OverridesDefaultStyle" Value="true" />
18-
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}" />
5+
<Setter Property="FocusVisualStyle" Value="{DynamicResource GenericFocusVisual}" />
196
<Setter Property="MinHeight" Value="16" />
207
<Setter Property="MinWidth" Value="16" />
218
<Setter Property="Foreground" Value="{DynamicResource TextColorBrush}" />

SuperLauncher/Themes/Controls/WinUICheckBox.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<Setter Property="SnapsToDevicePixels" Value="true" />
44
<Setter Property="OverridesDefaultStyle" Value="true" />
55
<Setter Property="Foreground" Value="{DynamicResource TextColorBrush}" />
6+
<Setter Property="FocusVisualStyle" Value="{DynamicResource GenericFocusVisual}" />
67
<Setter Property="Template">
78
<Setter.Value>
89
<ControlTemplate TargetType="{x:Type CheckBox}">
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
2+
<Style x:Key="GenericFocusVisual">
3+
<Setter Property="Control.Template">
4+
<Setter.Value>
5+
<ControlTemplate>
6+
<Border>
7+
<Rectangle RadiusX="5" RadiusY="5" Margin="-3" StrokeThickness="2" Stroke="{DynamicResource AccentColorBrush}" />
8+
</Border>
9+
</ControlTemplate>
10+
</Setter.Value>
11+
</Setter>
12+
</Style>
13+
</ResourceDictionary>

SuperLauncher/Themes/WinUI.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<FontFamily x:Key="Font">/Resources/#Segoe UI</FontFamily>
3737
<FontFamily x:Key="SLIcons">/Resources/#Super Launcher Icons</FontFamily>
3838
<ResourceDictionary.MergedDictionaries>
39+
<ResourceDictionary Source="/Themes/Controls/WinUIControl.xaml" />
3940
<ResourceDictionary Source="/Themes/Controls/WinUIScrollBar.xaml" />
4041
<ResourceDictionary Source="/Themes/Controls/WinUITextBox.xaml" />
4142
<ResourceDictionary Source="/Themes/Controls/WinUIButton.xaml" />

0 commit comments

Comments
 (0)