Skip to content

Commit

Permalink
Refine window style
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinnara committed Dec 16, 2019
1 parent 83ed673 commit f598eab
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions ModernWpf.SampleApp/WindowWithCustomTitleBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@
</Style>
<Style x:Key="AppTitleBarButtonStyle" TargetType="ui:TitleBarButton">
<Setter Property="IsActive" Value="{Binding IsActive, ElementName=Window}" />
<Setter Property="InactiveForeground" Value="{DynamicResource SystemControlDisabledBaseMediumLowBrush}" />
</Style>
<Style x:Key="AppTitleBarBackButtonStyle" TargetType="ui:TitleBarButton" BasedOn="{StaticResource TitleBarBackButtonStyle}">
<Setter Property="IsActive" Value="{Binding IsActive, ElementName=Window}" />
<Setter Property="InactiveForeground" Value="{DynamicResource SystemControlDisabledBaseMediumLowBrush}" />
</Style>
</Window.Resources>

Expand Down
2 changes: 1 addition & 1 deletion ModernWpf/Styles/Window.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<Setter Property="local:TitleBar.Background" Value="Transparent" />
<Setter Property="local:TitleBar.Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}" />
<Setter Property="local:TitleBar.InactiveBackground" Value="Transparent" />
<Setter Property="local:TitleBar.InactiveForeground" Value="{DynamicResource SystemControlForegroundChromeDisabledLowBrush}" />
<Setter Property="local:TitleBar.InactiveForeground" Value="{DynamicResource SystemControlDisabledBaseMediumLowBrush}" />
<Setter Property="local:TitleBar.BackButtonStyle" Value="{StaticResource TitleBarBackButtonStyle}" />
<Setter Property="Template">
<Setter.Value>
Expand Down
4 changes: 2 additions & 2 deletions ModernWpf/ThemeResources/Dark.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1251,8 +1251,8 @@
<m:StaticResource x:Key="TextControlButtonForegroundPressed" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />

<!-- Resources for Window -->
<SolidColorBrush x:Key="WindowBorder" Color="{m:StaticColor SystemChromeGrayColor}" />
<SolidColorBrush x:Key="WindowBorderInactive" Color="{m:StaticColor SystemChromeDisabledHighColor}" />
<SolidColorBrush x:Key="WindowBorder" Color="#FF707070" />
<SolidColorBrush x:Key="WindowBorderInactive" Color="#FF555555" />
<SolidColorBrush x:Key="TitleBarButtonBackground" Color="Transparent" />
<SolidColorBrush x:Key="TitleBarButtonBackgroundInactive" Color="Transparent" />

Expand Down
4 changes: 2 additions & 2 deletions ModernWpf/ThemeResources/Light.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1251,8 +1251,8 @@
<m:StaticResource x:Key="TextControlButtonForegroundPressed" ResourceKey="SystemControlHighlightAltChromeWhiteBrush" />

<!-- Resources for Window -->
<SolidColorBrush x:Key="WindowBorder" Color="{m:StaticColor SystemChromeGrayColor}" />
<SolidColorBrush x:Key="WindowBorderInactive" Color="{m:StaticColor SystemChromeDisabledHighColor}" />
<SolidColorBrush x:Key="WindowBorder" Color="#FF707070" />
<SolidColorBrush x:Key="WindowBorderInactive" Color="#FFAAAAAA" />
<SolidColorBrush x:Key="TitleBarButtonBackground" Color="Transparent" />
<SolidColorBrush x:Key="TitleBarButtonBackgroundInactive" Color="Transparent" />

Expand Down
2 changes: 1 addition & 1 deletion ModernWpf/TitleBar/TitleBarButton.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Setter Property="Background" Value="{DynamicResource TitleBarButtonBackground}" />
<Setter Property="Foreground" Value="{DynamicResource SystemControlForegroundBaseHighBrush}" />
<Setter Property="InactiveBackground" Value="{DynamicResource TitleBarButtonBackgroundInactive}" />
<Setter Property="InactiveForeground" Value="{DynamicResource SystemControlForegroundChromeDisabledLowBrush}" />
<Setter Property="InactiveForeground" Value="{DynamicResource SystemControlDisabledBaseMediumLowBrush}" />
<Setter Property="HoverBackground" Value="{DynamicResource SystemControlHighlightListLowBrush}" />
<Setter Property="HoverForeground" Value="{DynamicResource SystemControlHighlightAltBaseHighBrush}" />
<Setter Property="PressedBackground" Value="{DynamicResource SystemControlHighlightListMediumBrush}" />
Expand Down

0 comments on commit f598eab

Please sign in to comment.