Skip to content

Commit

Permalink
Update size, font and shared names
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink authored and punker76 committed Jul 29, 2019
1 parent f1169a3 commit a2f8d7d
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 38 deletions.
6 changes: 3 additions & 3 deletions src/MahApps.Metro/Styles/Controls.Buttons.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1077,8 +1077,8 @@
</Style>

<Style x:Key="MahApps.Styles.Button.System.Mui" TargetType="ButtonBase" BasedOn="{StaticResource MahApps.Styles.Button.System.Base.Mui}">
<Setter Property="Width" Value="{DynamicResource SystemButtonWidth}" />
<Setter Property="Height" Value="{DynamicResource SystemButtonHeight}" />
<Setter Property="Width" Value="{DynamicResource MahApps.Sizes.Button.System.Width.Mui}" />
<Setter Property="Height" Value="{DynamicResource MahApps.Sizes.Button.System.Height.Mui}" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.ButtonText.Mui}"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
Expand All @@ -1096,7 +1096,7 @@
</Style>

<Style x:Key="MahApps.Styles.Button.System.Close.Mui" TargetType="ButtonBase" BasedOn="{StaticResource MahApps.Styles.Button.System.Mui}">
<Setter Property="Width" Value="{DynamicResource CloseButtonWidth}" />
<Setter Property="Width" Value="{DynamicResource MahApps.Sizes.Button.Close.Width.Mui}" />
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.CloseButtonBackground.Mui}" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
Expand Down
6 changes: 3 additions & 3 deletions src/MahApps.Metro/Styles/Controls.Calendar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@
<ControlTemplate.Resources>
<DataTemplate x:Key="{x:Static CalendarItem.DayTitleTemplateResourceKey}">
<TextBlock x:Name="Text" FontWeight="Bold"
FontSize="{DynamicResource DefaultFontSize}"
FontSize="{DynamicResource MahApps.Sizes.Font.Default.Mui}"
Foreground="{DynamicResource MahApps.Brushes.ItemText.Mui}"
HorizontalAlignment="Center"
Text="{Binding}"
Expand Down Expand Up @@ -722,7 +722,7 @@
<Style x:Key="MahApps.Styles.CalendarDayButton.Mui" TargetType="CalendarDayButton" >
<Setter Property="MinWidth" Value="5"/>
<Setter Property="MinHeight" Value="5"/>
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}"/>
<Setter Property="FontSize" Value="{DynamicResource MahApps.Sizes.Font.Default.Mui}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
Expand Down Expand Up @@ -786,7 +786,7 @@
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.ButtonText.Mui}" />
<Setter Property="MinWidth" Value="40"/>
<Setter Property="MinHeight" Value="42"/>
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}"/>
<Setter Property="FontSize" Value="{DynamicResource MahApps.Sizes.Font.Default.Mui}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
Expand Down
4 changes: 2 additions & 2 deletions src/MahApps.Metro/Styles/Controls.ContextMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,8 @@
<!-- MUI -->

<Style x:Key="MahApps.Styles.ContextMenu.Mui" TargetType="{x:Type ContextMenu}">
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}"/>
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
<Setter Property="FontFamily" Value="{DynamicResource MahApps.Fonts.Default.Mui}"/>
<Setter Property="FontSize" Value="{DynamicResource MahApps.Sizes.Font.Default.Mui}" />
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.WindowBackground.Mui}" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.ItemText.Mui}"/>
Expand Down
4 changes: 2 additions & 2 deletions src/MahApps.Metro/Styles/Controls.DataGrid.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,8 @@
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.DataGridHeaderForeground.Mui}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}" />
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}" />
<Setter Property="FontFamily" Value="{DynamicResource MahApps.Fonts.Default.Mui}" />
<Setter Property="FontSize" Value="{DynamicResource MahApps.Sizes.Font.Default.Mui}" />
<Setter Property="Padding" Value="4,3,4,3"/>
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
Expand Down
8 changes: 4 additions & 4 deletions src/MahApps.Metro/Styles/Controls.TextBlock.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@

<Style x:Key="MahApps.Styles.TextBlock.Small.Mui" TargetType="TextBlock">
<Setter Property="FontFamily" Value="Segoe UI" />
<Setter Property="FontSize" Value="{DynamicResource SmallFontSize}"/>
<Setter Property="FontSize" Value="{DynamicResource MahApps.Sizes.Font.Small.Mui}"/>
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
</Style>

<Style x:Key="MahApps.Styles.TextBlock.Emphasis.Mui" TargetType="TextBlock">
<Setter Property="FontFamily" Value="Segoe UI" />
<Setter Property="FontSize" Value="{DynamicResource SmallFontSize}"/>
<Setter Property="FontSize" Value="{DynamicResource MahApps.Sizes.Font.Small.Mui}"/>
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
</Style>

<Style x:Key="MahApps.Styles.TextBlock.Fixed.Mui" TargetType="TextBlock">
<Setter Property="FontFamily" Value="{DynamicResource FixedFontFamily}" />
<Setter Property="FontSize" Value="{DynamicResource FixedFontSize}"/>
<Setter Property="FontFamily" Value="{DynamicResource MahApps.Fonts.Fixed.Mui}" />
<Setter Property="FontSize" Value="{DynamicResource MahApps.Sizes.Font.Fixed.Mui}"/>
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
</Style>

Expand Down
4 changes: 2 additions & 2 deletions src/MahApps.Metro/Styles/Controls.Tooltip.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
<Setter Property="BorderBrush" Value="{DynamicResource MahApps.Brushes.WindowBorderActive.Mui}"/>
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.WindowBackground.Mui}"/>
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.WindowText.Mui}"/>
<Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}"/>
<Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}"/>
<Setter Property="FontFamily" Value="{DynamicResource MahApps.Fonts.Default.Mui}"/>
<Setter Property="FontSize" Value="{DynamicResource MahApps.Sizes.Font.Default.Mui}"/>
<Setter Property="FontStyle" Value="Normal"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="Padding" Value="5,1,5,4"/>
Expand Down
10 changes: 5 additions & 5 deletions src/MahApps.Metro/Styles/Fonts.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@

<!-- MUI -->

<FontFamily x:Key="DefaultFontFamily">Segoe UI</FontFamily>
<FontFamily x:Key="FixedFontFamily">Consolas</FontFamily>
<FontFamily x:Key="MahApps.Fonts.Default.Mui">Segoe UI</FontFamily>
<FontFamily x:Key="MahApps.Fonts.Fixed.Mui">Consolas</FontFamily>

<System:Double x:Key="DefaultFontSize">13</System:Double>
<System:Double x:Key="FixedFontSize">13.333</System:Double>
<System:Double x:Key="SmallFontSize">11</System:Double>
<System:Double x:Key="MahApps.Sizes.Font.Default.Mui">13</System:Double>
<System:Double x:Key="MahApps.Sizes.Font.Fixed.Mui">13.333</System:Double>
<System:Double x:Key="MahApps.Sizes.Font.Small.Mui">11</System:Double>

</ResourceDictionary>
14 changes: 0 additions & 14 deletions src/MahApps.Metro/Styles/Shared.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,4 @@
Duration="0:0:.2" />
</Storyboard>

<!-- MUI -->

<Thickness x:Key="RootMargin">-42,-8,-16,-16</Thickness>
<Thickness x:Key="ContentMargin">16,28,16,16</Thickness>
<Thickness x:Key="StatusMargin">-16,16,0,0</Thickness>
<Thickness x:Key="HeaderMargin">0,-28,44,0</Thickness>

<Thickness x:Key="SplitLeft">0,0,0,0</Thickness>
<Thickness x:Key="SplitRight">16,0,0,0</Thickness>

<Style x:Key="ContentRoot" TargetType="FrameworkElement">
<Setter Property="Margin" Value="{StaticResource ContentMargin}" />
</Style>

</ResourceDictionary>
6 changes: 3 additions & 3 deletions src/MahApps.Metro/Styles/Sizes.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

<!-- MUI -->

<System:Double x:Key="CloseButtonWidth">32</System:Double>
<System:Double x:Key="SystemButtonHeight">24</System:Double>
<System:Double x:Key="SystemButtonWidth">32</System:Double>
<System:Double x:Key="MahApps.Sizes.Button.Close.Width.Mui">32</System:Double>
<System:Double x:Key="MahApps.Sizes.Button.System.Height.Mui">24</System:Double>
<System:Double x:Key="MahApps.Sizes.Button.System.Width.Mui">32</System:Double>

</ResourceDictionary>

0 comments on commit a2f8d7d

Please sign in to comment.