From 511a58d0cbb858e2050f67daf4cb47c80204e789 Mon Sep 17 00:00:00 2001 From: xiaoy312 Date: Tue, 10 Oct 2023 11:03:28 -0400 Subject: [PATCH] chore: wip (to rebase) --- .../Uno.Themes.WinUI.Markup/Theme/Button.cs | 55 ++++++++++--------- .../Theme/CalendarDatePicker.cs | 15 ++--- .../Theme/CalendarView.cs | 7 ++- .../Uno.Themes.WinUI.Markup/Theme/CheckBox.cs | 19 ++++--- .../Uno.Themes.WinUI.Markup/Theme/ComboBox.cs | 33 +++++------ .../Theme/CommandBar.cs | 13 ++--- .../Theme/ContentDialog.cs | 7 ++- .../Theme/DatePicker.cs | 19 ++++--- .../Theme/FloatingActionButton.cs | 55 ++++++++++--------- .../Theme/HyperlinkButton.cs | 13 +++-- .../Theme/MediaPlayerElement.cs | 7 ++- .../Theme/PasswordBox.cs | 37 +++++++------ .../Theme/ProgressBar.cs | 7 ++- .../Theme/ProgressRing.cs | 13 ++--- .../Theme/RadioButton.cs | 21 +++---- .../Theme/RatingControl.cs | 17 +++--- .../Uno.Themes.WinUI.Markup/Theme/Slider.cs | 21 +++---- .../Theme/TextBlock.cs | 7 ++- .../Uno.Themes.WinUI.Markup/Theme/TextBox.cs | 41 +++++++------- .../Theme/ToggleButton.cs | 27 ++++----- .../Theme/ToggleSwitch.cs | 35 ++++++------ 21 files changed, 239 insertions(+), 230 deletions(-) diff --git a/src/library/Uno.Themes.WinUI.Markup/Theme/Button.cs b/src/library/Uno.Themes.WinUI.Markup/Theme/Button.cs index 1232e0bb2..29e09298a 100644 --- a/src/library/Uno.Themes.WinUI.Markup/Theme/Button.cs +++ b/src/library/Uno.Themes.WinUI.Markup/Theme/Button.cs @@ -1,4 +1,5 @@ using System; +using Windows.UI; using Microsoft.UI.Text; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Media; @@ -9,13 +10,13 @@ namespace Uno.Themes.Markup { public static partial class Theme { - public static class Button + public static partial class Button { - public static class Resources + public static partial class Resources { - public static class Elevated + public static partial class Elevated { - public static class Background + public static partial class Background { [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBackground")] public static ThemeResourceKey Default => new("ElevatedButtonBackground"); @@ -35,7 +36,7 @@ public static class Background [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBackgroundPressed")] public static ThemeResourceKey Pressed => new("ElevatedButtonBackgroundPressed"); } - public static class BorderBrush + public static partial class BorderBrush { [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBorderBrush")] public static ThemeResourceKey Default => new("ElevatedButtonBorderBrush"); @@ -55,7 +56,7 @@ public static class BorderBrush [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBorderBrushPressed")] public static ThemeResourceKey Pressed => new("ElevatedButtonBorderBrushPressed"); } - public static class Margin + public static partial class Margin { [ResourceKeyDefinition(typeof(Thickness), "ElevatedButtonMargin")] public static ThemeResourceKey Default => new("ElevatedButtonMargin"); @@ -63,7 +64,7 @@ public static class Margin [ResourceKeyDefinition(typeof(Thickness), "ElevatedButtonDisabledMargin")] public static ThemeResourceKey Disabled => new("ElevatedButtonDisabledMargin"); } - public static class StateLayerBackground + public static partial class StateLayerBackground { [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonStateLayerBackgroundFocused")] public static ThemeResourceKey Focused => new("ElevatedButtonStateLayerBackgroundFocused"); @@ -89,9 +90,9 @@ public static class StateLayerBackground [ResourceKeyDefinition(typeof(double), "ElevatedButtonElevationDisabled")] public static ThemeResourceKey ElevationDisabled => new("ElevatedButtonElevationDisabled"); } - public static class Filled + public static partial class Filled { - public static class Background + public static partial class Background { [ResourceKeyDefinition(typeof(Brush), "FilledButtonBackground")] public static ThemeResourceKey Default => new("FilledButtonBackground"); @@ -111,7 +112,7 @@ public static class Background [ResourceKeyDefinition(typeof(Brush), "FilledButtonBackgroundPressed")] public static ThemeResourceKey Pressed => new("FilledButtonBackgroundPressed"); } - public static class BorderBrush + public static partial class BorderBrush { [ResourceKeyDefinition(typeof(Brush), "FilledButtonBorderBrush")] public static ThemeResourceKey Default => new("FilledButtonBorderBrush"); @@ -131,7 +132,7 @@ public static class BorderBrush [ResourceKeyDefinition(typeof(Brush), "FilledButtonBorderBrushPressed")] public static ThemeResourceKey Pressed => new("FilledButtonBorderBrushPressed"); } - public static class StateLayerBackground + public static partial class StateLayerBackground { [ResourceKeyDefinition(typeof(Brush), "FilledButtonStateLayerBackgroundFocused")] public static ThemeResourceKey Focused => new("FilledButtonStateLayerBackgroundFocused"); @@ -154,9 +155,9 @@ public static class StateLayerBackground [ResourceKeyDefinition(typeof(Thickness), "ButtonMargin")] public static ThemeResourceKey Margin => new("ButtonMargin"); } - public static class FilledTonal + public static partial class FilledTonal { - public static class Background + public static partial class Background { [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBackground")] public static ThemeResourceKey Default => new("FilledTonalButtonBackground"); @@ -176,7 +177,7 @@ public static class Background [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBackgroundPressed")] public static ThemeResourceKey Pressed => new("FilledTonalButtonBackgroundPressed"); } - public static class BorderBrush + public static partial class BorderBrush { [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBorderBrush")] public static ThemeResourceKey Default => new("FilledTonalButtonBorderBrush"); @@ -196,7 +197,7 @@ public static class BorderBrush [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBorderBrushPressed")] public static ThemeResourceKey Pressed => new("FilledTonalButtonBorderBrushPressed"); } - public static class StateLayerBackground + public static partial class StateLayerBackground { [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonStateLayerBackgroundFocused")] public static ThemeResourceKey Focused => new("FilledTonalButtonStateLayerBackgroundFocused"); @@ -219,9 +220,9 @@ public static class StateLayerBackground [ResourceKeyDefinition(typeof(Thickness), "ButtonMargin")] public static ThemeResourceKey Margin => new("ButtonMargin"); } - public static class Icon + public static partial class Icon { - public static class Ellipse + public static partial class Ellipse { [ResourceKeyDefinition(typeof(string), "IconButtonEllipseHorizontalAlignment")] public static StaticResourceKey HorizontalAlignment => new("IconButtonEllipseHorizontalAlignment"); @@ -229,7 +230,7 @@ public static class Ellipse [ResourceKeyDefinition(typeof(string), "IconButtonEllipseVerticalAlignment")] public static StaticResourceKey VerticalAlignment => new("IconButtonEllipseVerticalAlignment"); } - public static class OpacityHiddenState + public static partial class OpacityHiddenState { [ResourceKeyDefinition(typeof(double), "IconButtonOpacityHiddenState")] public static ThemeResourceKey Default => new("IconButtonOpacityHiddenState"); @@ -252,9 +253,9 @@ public static class OpacityHiddenState [ResourceKeyDefinition(typeof(Brush), "IconButtonForegroundDisabled")] public static ThemeResourceKey ForegroundDisabled => new("IconButtonForegroundDisabled"); } - public static class Outlined + public static partial class Outlined { - public static class Background + public static partial class Background { [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBackground")] public static ThemeResourceKey Default => new("OutlinedButtonBackground"); @@ -271,7 +272,7 @@ public static class Background [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBackgroundPressed")] public static ThemeResourceKey Pressed => new("OutlinedButtonBackgroundPressed"); } - public static class BorderBrush + public static partial class BorderBrush { [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBorderBrush")] public static ThemeResourceKey Default => new("OutlinedButtonBorderBrush"); @@ -291,7 +292,7 @@ public static class BorderBrush [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBorderBrushPressed")] public static ThemeResourceKey Pressed => new("OutlinedButtonBorderBrushPressed"); } - public static class StateLayerBackground + public static partial class StateLayerBackground { [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonStateLayerBackgroundFocused")] public static ThemeResourceKey Focused => new("OutlinedButtonStateLayerBackgroundFocused"); @@ -311,9 +312,9 @@ public static class StateLayerBackground [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonForeground")] public static ThemeResourceKey Foreground => new("OutlinedButtonForeground"); } - public static class Text + public static partial class Text { - public static class Background + public static partial class Background { [ResourceKeyDefinition(typeof(Brush), "TextButtonBackground")] public static ThemeResourceKey Default => new("TextButtonBackground"); @@ -330,7 +331,7 @@ public static class Background [ResourceKeyDefinition(typeof(Brush), "TextButtonBackgroundPressed")] public static ThemeResourceKey Pressed => new("TextButtonBackgroundPressed"); } - public static class BorderBrush + public static partial class BorderBrush { [ResourceKeyDefinition(typeof(Brush), "TextButtonBorderBrush")] public static ThemeResourceKey Default => new("TextButtonBorderBrush"); @@ -350,7 +351,7 @@ public static class BorderBrush [ResourceKeyDefinition(typeof(Brush), "TextButtonBorderBrushPressed")] public static ThemeResourceKey Pressed => new("TextButtonBorderBrushPressed"); } - public static class StateLayerBackground + public static partial class StateLayerBackground { [ResourceKeyDefinition(typeof(Brush), "TextButtonStateLayerBackgroundFocused")] public static ThemeResourceKey Focused => new("TextButtonStateLayerBackgroundFocused"); @@ -391,7 +392,7 @@ public static class StateLayerBackground [ResourceKeyDefinition(typeof(string), "ButtonVerticalContentAlignment")] public static StaticResourceKey VerticalContentAlignment => new("ButtonVerticalContentAlignment"); } - public static class Styles + public static partial class Styles { [ResourceKeyDefinition(typeof(Style), "MaterialElevatedButtonStyle", TargetType = typeof(Style))] public static StaticResourceKey