Skip to content

Commit

Permalink
Merge pull request #3119 from MahApps/feature/3118_Fix_for_FlatButton…
Browse files Browse the repository at this point in the history
…_FocusVisualStyle

(#3118) Fix for dark theme FlatButton FocusVisualStyle Foreground
  • Loading branch information
punker76 committed Dec 13, 2017
2 parents 92ab747 + d99642d commit 1b04a8c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/MahApps.Metro/MahApps.Metro/Styles/Controls.Buttons.xaml
Expand Up @@ -5,9 +5,25 @@

<converters:ThicknessToDoubleConverter x:Key="BorderThicknessToStrokeThicknessConverter" TakeThicknessSide="Left" />

<Style x:Key="MahApps.Metro.Styles.FlatButtonFocusVisualStyle">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2"
SnapsToDevicePixels="True"
Stroke="{DynamicResource FlatButtonForegroundBrush}"
StrokeDashArray="1 2"
StrokeThickness="1"
UseLayoutRounding="True" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<Style x:Key="MetroFlatButton" TargetType="{x:Type Button}">
<Setter Property="Background" Value="{DynamicResource FlatButtonBackgroundBrush}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource MahApps.Metro.Styles.FlatButtonFocusVisualStyle}" />
<Setter Property="FontSize" Value="{DynamicResource FlatButtonFontSize}" />
<Setter Property="Foreground" Value="{DynamicResource FlatButtonForegroundBrush}" />
<Setter Property="Padding" Value="10 5 10 5" />
Expand Down Expand Up @@ -54,6 +70,7 @@
<Style x:Key="MetroFlatToggleButton" TargetType="{x:Type ToggleButton}">
<Setter Property="Background" Value="{DynamicResource FlatButtonBackgroundBrush}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource MahApps.Metro.Styles.FlatButtonFocusVisualStyle}" />
<Setter Property="FontSize" Value="{DynamicResource FlatButtonFontSize}" />
<Setter Property="Foreground" Value="{DynamicResource FlatButtonForegroundBrush}" />
<Setter Property="Padding" Value="10 5 10 5" />
Expand Down

0 comments on commit 1b04a8c

Please sign in to comment.