Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds style for Resizegrip in fluent #10511

Merged
merged 5 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,9 @@
<SolidColorBrush x:Key="RepeatButtonForegroundPressed" Color="{StaticResource TextFillColorSecondary}" />
<SolidColorBrush x:Key="RepeatButtonForegroundDisabled" Color="{StaticResource TextFillColorDisabled}" />

<!-- ResizeGrip -->
<SolidColorBrush x:Key="ResizeGripForeground" Color="{StaticResource ControlStrongFillColorDefault}" />

<!-- ScrollBar -->
<SolidColorBrush x:Key="ScrollBarTrackFill" Color="{StaticResource SubtleFillColorTransparent}" />
<SolidColorBrush x:Key="ScrollBarTrackStroke" Color="{StaticResource SubtleFillColorTransparent}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,9 @@
<SolidColorBrush x:Key="RepeatButtonForegroundPressed" Color="{StaticResource SystemColorHighlightColor}" />
<SolidColorBrush x:Key="RepeatButtonForegroundDisabled" Color="{StaticResource SystemColorGrayTextColor}" />

<!-- ResizeGrip -->
<SolidColorBrush x:Key="ResizeGripForeground" Color="{StaticResource SystemColorButtonTextColor}" />

<!-- ScrollBar -->
<SolidColorBrush x:Key="ScrollBarTrackFill" Color="Transparent" />
<SolidColorBrush x:Key="ScrollBarTrackStroke" Color="{StaticResource SystemColorWindowTextColor}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,9 @@
<!-- RatingControl -->
<SolidColorBrush x:Key="RatingControlSelectedForeground" Color="{StaticResource SystemAccentColorDark1}" />

<!-- ResizeGrip -->
<SolidColorBrush x:Key="ResizeGripForeground" Color="{StaticResource ControlStrongFillColorDefault}" />

<!-- RepeatButton -->
<SolidColorBrush x:Key="RepeatButtonBackground" Color="{StaticResource ControlFillColorDefault}" />
<SolidColorBrush x:Key="RepeatButtonBackgroundPointerOver" Color="{StaticResource ControlFillColorSecondary}" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=System.Runtime">

<sys:Double x:Key="ResizeGripMinHeight">12</sys:Double>
<sys:Double x:Key="ResizeGripMinWidth">12</sys:Double>
<sys:Double x:Key="ResizeGripIconSize">8.0</sys:Double>
<sys:String x:Key="ResizeGripIconGlyph">&#xF169;</sys:String>

<Style x:Key="DefaultResizeGripStyle" TargetType="{x:Type ResizeGrip}">
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="MinWidth" Value="{DynamicResource ResizeGripMinWidth}" />
<Setter Property="MinHeight" Value="{DynamicResource ResizeGripMinHeight}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ResizeGrip">
<Grid
SnapsToDevicePixels="True"
Background="{TemplateBinding Background}">
<TextBlock
FontFamily="{DynamicResource SymbolThemeFontFamily}"
Text="{StaticResource ResizeGripIconGlyph}"
FontSize="{DynamicResource ResizeGripIconSize}"
Foreground="{DynamicResource ResizeGripForeground}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

<Style BasedOn="{StaticResource DefaultResizeGripStyle}" TargetType="{x:Type ResizeGrip}"/>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,8 @@
<SolidColorBrush x:Key="RepeatButtonForeground" Color="{StaticResource TextFillColorPrimary}" />
<SolidColorBrush x:Key="RepeatButtonForegroundPressed" Color="{StaticResource TextFillColorSecondary}" />
<SolidColorBrush x:Key="RepeatButtonForegroundDisabled" Color="{StaticResource TextFillColorDisabled}" />
<!-- ResizeGrip -->
<SolidColorBrush x:Key="ResizeGripForeground" Color="{StaticResource ControlStrongFillColorDefault}" />
<!-- ScrollBar -->
<SolidColorBrush x:Key="ScrollBarTrackFill" Color="{StaticResource SubtleFillColorTransparent}" />
<SolidColorBrush x:Key="ScrollBarTrackStroke" Color="{StaticResource SubtleFillColorTransparent}" />
Expand Down Expand Up @@ -3504,6 +3506,26 @@
</Setter>
</Style>
<Style BasedOn="{StaticResource DefaultRepeatButtonStyle}" TargetType="{x:Type RepeatButton}" />
<sys:Double x:Key="ResizeGripMinHeight" xmlns:sys="clr-namespace:System;assembly=System.Runtime">12</sys:Double>
<sys:Double x:Key="ResizeGripMinWidth" xmlns:sys="clr-namespace:System;assembly=System.Runtime">12</sys:Double>
<sys:Double x:Key="ResizeGripIconSize" xmlns:sys="clr-namespace:System;assembly=System.Runtime">8.0</sys:Double>
<sys:String x:Key="ResizeGripIconGlyph" xmlns:sys="clr-namespace:System;assembly=System.Runtime"></sys:String>
<Style x:Key="DefaultResizeGripStyle" TargetType="{x:Type ResizeGrip}">
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="MinWidth" Value="{DynamicResource ResizeGripMinWidth}" />
<Setter Property="MinHeight" Value="{DynamicResource ResizeGripMinHeight}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ResizeGrip">
<Grid SnapsToDevicePixels="True" Background="{TemplateBinding Background}">
<TextBlock FontFamily="{DynamicResource SymbolThemeFontFamily}" Text="{StaticResource ResizeGripIconGlyph}" FontSize="{DynamicResource ResizeGripIconSize}" Foreground="{DynamicResource ResizeGripForeground}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style BasedOn="{StaticResource DefaultResizeGripStyle}" TargetType="{x:Type ResizeGrip}" />
<Thickness x:Key="RichTextBoxAccentBorderThemeThickness">0,0,0,1</Thickness>
<Style x:Key="DefaultRichTextBoxStyle" TargetType="{x:Type RichTextBox}">
<Setter Property="Foreground" Value="{DynamicResource TextControlForeground}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,8 @@
<SolidColorBrush x:Key="RepeatButtonForeground" Color="{StaticResource SystemColorWindowTextColor}" />
<SolidColorBrush x:Key="RepeatButtonForegroundPressed" Color="{StaticResource SystemColorHighlightColor}" />
<SolidColorBrush x:Key="RepeatButtonForegroundDisabled" Color="{StaticResource SystemColorGrayTextColor}" />
<!-- ResizeGrip -->
<SolidColorBrush x:Key="ResizeGripForeground" Color="{StaticResource SystemColorButtonTextColor}" />
<!-- ScrollBar -->
<SolidColorBrush x:Key="ScrollBarTrackFill" Color="Transparent" />
<SolidColorBrush x:Key="ScrollBarTrackStroke" Color="{StaticResource SystemColorWindowTextColor}" />
Expand Down Expand Up @@ -3485,6 +3487,26 @@
</Setter>
</Style>
<Style BasedOn="{StaticResource DefaultRepeatButtonStyle}" TargetType="{x:Type RepeatButton}" />
<sys:Double x:Key="ResizeGripMinHeight" xmlns:sys="clr-namespace:System;assembly=System.Runtime">12</sys:Double>
<sys:Double x:Key="ResizeGripMinWidth" xmlns:sys="clr-namespace:System;assembly=System.Runtime">12</sys:Double>
<sys:Double x:Key="ResizeGripIconSize" xmlns:sys="clr-namespace:System;assembly=System.Runtime">8.0</sys:Double>
<sys:String x:Key="ResizeGripIconGlyph" xmlns:sys="clr-namespace:System;assembly=System.Runtime"></sys:String>
<Style x:Key="DefaultResizeGripStyle" TargetType="{x:Type ResizeGrip}">
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="MinWidth" Value="{DynamicResource ResizeGripMinWidth}" />
<Setter Property="MinHeight" Value="{DynamicResource ResizeGripMinHeight}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ResizeGrip">
<Grid SnapsToDevicePixels="True" Background="{TemplateBinding Background}">
<TextBlock FontFamily="{DynamicResource SymbolThemeFontFamily}" Text="{StaticResource ResizeGripIconGlyph}" FontSize="{DynamicResource ResizeGripIconSize}" Foreground="{DynamicResource ResizeGripForeground}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style BasedOn="{StaticResource DefaultResizeGripStyle}" TargetType="{x:Type ResizeGrip}" />
<Thickness x:Key="RichTextBoxAccentBorderThemeThickness">0,0,0,1</Thickness>
<Style x:Key="DefaultRichTextBoxStyle" TargetType="{x:Type RichTextBox}">
<Setter Property="Foreground" Value="{DynamicResource TextControlForeground}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,8 @@
<SolidColorBrush x:Key="RadioButtonOuterEllipseCheckedStrokeDisabled" Color="{StaticResource AccentFillColorDisabled}" />
<!-- RatingControl -->
<SolidColorBrush x:Key="RatingControlSelectedForeground" Color="{StaticResource SystemAccentColorDark1}" />
<!-- ResizeGrip -->
<SolidColorBrush x:Key="ResizeGripForeground" Color="{StaticResource ControlStrongFillColorDefault}" />
<!-- RepeatButton -->
<SolidColorBrush x:Key="RepeatButtonBackground" Color="{StaticResource ControlFillColorDefault}" />
<SolidColorBrush x:Key="RepeatButtonBackgroundPointerOver" Color="{StaticResource ControlFillColorSecondary}" />
Expand Down Expand Up @@ -3501,6 +3503,26 @@
</Setter>
</Style>
<Style BasedOn="{StaticResource DefaultRepeatButtonStyle}" TargetType="{x:Type RepeatButton}" />
<sys:Double x:Key="ResizeGripMinHeight" xmlns:sys="clr-namespace:System;assembly=System.Runtime">12</sys:Double>
<sys:Double x:Key="ResizeGripMinWidth" xmlns:sys="clr-namespace:System;assembly=System.Runtime">12</sys:Double>
<sys:Double x:Key="ResizeGripIconSize" xmlns:sys="clr-namespace:System;assembly=System.Runtime">8.0</sys:Double>
<sys:String x:Key="ResizeGripIconGlyph" xmlns:sys="clr-namespace:System;assembly=System.Runtime"></sys:String>
<Style x:Key="DefaultResizeGripStyle" TargetType="{x:Type ResizeGrip}">
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="MinWidth" Value="{DynamicResource ResizeGripMinWidth}" />
<Setter Property="MinHeight" Value="{DynamicResource ResizeGripMinHeight}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ResizeGrip">
<Grid SnapsToDevicePixels="True" Background="{TemplateBinding Background}">
<TextBlock FontFamily="{DynamicResource SymbolThemeFontFamily}" Text="{StaticResource ResizeGripIconGlyph}" FontSize="{DynamicResource ResizeGripIconSize}" Foreground="{DynamicResource ResizeGripForeground}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style BasedOn="{StaticResource DefaultResizeGripStyle}" TargetType="{x:Type ResizeGrip}" />
<Thickness x:Key="RichTextBoxAccentBorderThemeThickness">0,0,0,1</Thickness>
<Style x:Key="DefaultRichTextBoxStyle" TargetType="{x:Type RichTextBox}">
<Setter Property="Foreground" Value="{DynamicResource TextControlForeground}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<ResourceDictionary Source="pack://application:,,,/PresentationFramework.Fluent;component/Styles/ProgressBar.xaml" />
<ResourceDictionary Source="pack://application:,,,/PresentationFramework.Fluent;component/Styles/RadioButton.xaml" />
<ResourceDictionary Source="pack://application:,,,/PresentationFramework.Fluent;component/Styles/RepeatButton.xaml" />
<ResourceDictionary Source="pack://application:,,,/PresentationFramework.Fluent;component/Styles/ResizeGrip.xaml" />
<ResourceDictionary Source="pack://application:,,,/PresentationFramework.Fluent;component/Styles/RichTextBox.xaml" />
<ResourceDictionary Source="pack://application:,,,/PresentationFramework.Fluent;component/Styles/ScrollBar.xaml" />
<ResourceDictionary Source="pack://application:,,,/PresentationFramework.Fluent;component/Styles/ScrollViewer.xaml" />
Expand Down