From bbcefd0b0450c1dfd3f243312c36b68f4d12ae1a Mon Sep 17 00:00:00 2001 From: Difegue Date: Tue, 24 Sep 2024 16:23:16 +0200 Subject: [PATCH 1/2] Fix elevationBrushes to match WinUI Making the brush not-shared is necessary for it to work properly with content of any height --- src/Wpf.Ui/Controls/NumberBox/NumberBox.xaml | 2 +- src/Wpf.Ui/Controls/PasswordBox/PasswordBox.xaml | 2 +- src/Wpf.Ui/Resources/Theme/Dark.xaml | 11 +++++++---- src/Wpf.Ui/Resources/Theme/Light.xaml | 11 +++++++---- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/Wpf.Ui/Controls/NumberBox/NumberBox.xaml b/src/Wpf.Ui/Controls/NumberBox/NumberBox.xaml index 58f36f9a1..47480617e 100644 --- a/src/Wpf.Ui/Controls/NumberBox/NumberBox.xaml +++ b/src/Wpf.Ui/Controls/NumberBox/NumberBox.xaml @@ -14,7 +14,7 @@ xmlns:controls="clr-namespace:Wpf.Ui.Controls" xmlns:system="clr-namespace:System;assembly=mscorlib"> - 1,1,1,0 + 1,1,1,1 0,0,0,1 10,8,0,0 0,8,10,0 diff --git a/src/Wpf.Ui/Controls/PasswordBox/PasswordBox.xaml b/src/Wpf.Ui/Controls/PasswordBox/PasswordBox.xaml index 346b8a68d..5e4b52517 100644 --- a/src/Wpf.Ui/Controls/PasswordBox/PasswordBox.xaml +++ b/src/Wpf.Ui/Controls/PasswordBox/PasswordBox.xaml @@ -14,7 +14,7 @@ xmlns:controls="clr-namespace:Wpf.Ui.Controls" xmlns:system="clr-namespace:System;assembly=mscorlib"> - 1,1,1,0 + 1,1,1,1 0,0,0,1 10,8,0,0 0,8,10,0 diff --git a/src/Wpf.Ui/Resources/Theme/Dark.xaml b/src/Wpf.Ui/Resources/Theme/Dark.xaml index 5a8200d85..359c2fc1a 100644 --- a/src/Wpf.Ui/Resources/Theme/Dark.xaml +++ b/src/Wpf.Ui/Resources/Theme/Dark.xaml @@ -240,7 +240,7 @@ - + @@ -267,10 +267,13 @@ - + + - - + + diff --git a/src/Wpf.Ui/Resources/Theme/Light.xaml b/src/Wpf.Ui/Resources/Theme/Light.xaml index a8288560c..018691d67 100644 --- a/src/Wpf.Ui/Resources/Theme/Light.xaml +++ b/src/Wpf.Ui/Resources/Theme/Light.xaml @@ -241,7 +241,7 @@ - + @@ -268,10 +268,13 @@ - + + + + - - + + From 6e437d088f95b06accd1511326678d335be90c9a Mon Sep 17 00:00:00 2001 From: Difegue Date: Thu, 3 Oct 2024 12:48:40 +0200 Subject: [PATCH 2/2] Fix elevation brush on ToggleButton as well --- .../Controls/ToggleButton/ToggleButton.xaml | 25 +++++++++++-------- src/Wpf.Ui/Resources/Theme/Dark.xaml | 2 +- src/Wpf.Ui/Resources/Theme/Light.xaml | 2 +- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/Wpf.Ui/Controls/ToggleButton/ToggleButton.xaml b/src/Wpf.Ui/Controls/ToggleButton/ToggleButton.xaml index 04af06574..3b3f232b5 100644 --- a/src/Wpf.Ui/Controls/ToggleButton/ToggleButton.xaml +++ b/src/Wpf.Ui/Controls/ToggleButton/ToggleButton.xaml @@ -10,7 +10,7 @@ - 11,5,11,6 + 11,5,11,5 1 0,0,8,0 @@ -41,20 +41,23 @@ Height="{TemplateBinding Height}" MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}" - Padding="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" Background="{TemplateBinding Background}" - BorderBrush="{TemplateBinding BorderBrush}" - BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding Border.CornerRadius}"> - + + + diff --git a/src/Wpf.Ui/Resources/Theme/Dark.xaml b/src/Wpf.Ui/Resources/Theme/Dark.xaml index 359c2fc1a..a41bed0d0 100644 --- a/src/Wpf.Ui/Resources/Theme/Dark.xaml +++ b/src/Wpf.Ui/Resources/Theme/Dark.xaml @@ -257,7 +257,7 @@ - + diff --git a/src/Wpf.Ui/Resources/Theme/Light.xaml b/src/Wpf.Ui/Resources/Theme/Light.xaml index 018691d67..f84dd28e9 100644 --- a/src/Wpf.Ui/Resources/Theme/Light.xaml +++ b/src/Wpf.Ui/Resources/Theme/Light.xaml @@ -258,7 +258,7 @@ - +