From ae1f4ffe604f1f9df70436411202dc7c857d286a Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Sat, 21 Sep 2024 22:12:00 +0800 Subject: [PATCH 1/3] feat: unity default theme of CheckBox & RadioButton. --- src/Semi.Avalonia/Controls/CheckBox.axaml | 26 ++++---- src/Semi.Avalonia/Controls/RadioButton.axaml | 64 ++++++------------- .../Themes/Shared/CheckBox.axaml | 2 + .../Themes/Shared/RadioButton.axaml | 3 + 4 files changed, 38 insertions(+), 57 deletions(-) diff --git a/src/Semi.Avalonia/Controls/CheckBox.axaml b/src/Semi.Avalonia/Controls/CheckBox.axaml index 450b88c..be03c6f 100644 --- a/src/Semi.Avalonia/Controls/CheckBox.axaml +++ b/src/Semi.Avalonia/Controls/CheckBox.axaml @@ -3,7 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:CompileBindings="True"> - @@ -11,7 +10,6 @@ - @@ -23,12 +21,11 @@ BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"> - - + + VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> - + @@ -78,7 +76,7 @@ - @@ -107,9 +100,6 @@ - @@ -118,9 +108,6 @@ - @@ -143,9 +130,6 @@ - @@ -154,9 +138,6 @@ - @@ -165,9 +146,6 @@ - diff --git a/src/Semi.Avalonia/Themes/Shared/CheckBox.axaml b/src/Semi.Avalonia/Themes/Shared/CheckBox.axaml index 81f824e..0d6993d 100644 --- a/src/Semi.Avalonia/Themes/Shared/CheckBox.axaml +++ b/src/Semi.Avalonia/Themes/Shared/CheckBox.axaml @@ -2,6 +2,8 @@ 14 16 16 + 8 0 0 0 + 10 10 diff --git a/src/Semi.Avalonia/Themes/Shared/RadioButton.axaml b/src/Semi.Avalonia/Themes/Shared/RadioButton.axaml index e3cefaa..d719b87 100644 --- a/src/Semi.Avalonia/Themes/Shared/RadioButton.axaml +++ b/src/Semi.Avalonia/Themes/Shared/RadioButton.axaml @@ -5,6 +5,9 @@ 14 0 2 8 0 + 1 + 8 0 0 0 + 3 From 92c13081f351002d03a3c8600920db9bba629e86 Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Sat, 21 Sep 2024 22:37:14 +0800 Subject: [PATCH 2/3] misc: remove prefix. --- src/Semi.Avalonia/Controls/Border.axaml | 5 -- src/Semi.Avalonia/Controls/CheckBox.axaml | 18 +++--- src/Semi.Avalonia/Controls/RadioButton.axaml | 59 +++++++++++--------- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/Semi.Avalonia/Controls/Border.axaml b/src/Semi.Avalonia/Controls/Border.axaml index bfc8a35..53806cf 100644 --- a/src/Semi.Avalonia/Controls/Border.axaml +++ b/src/Semi.Avalonia/Controls/Border.axaml @@ -16,11 +16,6 @@ - - - - - diff --git a/src/Semi.Avalonia/Controls/CheckBox.axaml b/src/Semi.Avalonia/Controls/CheckBox.axaml index be03c6f..5a6dce5 100644 --- a/src/Semi.Avalonia/Controls/CheckBox.axaml +++ b/src/Semi.Avalonia/Controls/CheckBox.axaml @@ -191,11 +191,11 @@ BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"> - - + + TemplatedControl.IsTemplateFocusTarget="True" + VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> - + @@ -328,7 +328,7 @@ - + - + - + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + Date: Sun, 22 Sep 2024 00:15:15 +0800 Subject: [PATCH 3/3] feat: enhancement. --- src/Semi.Avalonia/Controls/CheckBox.axaml | 71 +++++++----- src/Semi.Avalonia/Controls/RadioButton.axaml | 101 +++++++----------- .../Themes/Shared/CheckBox.axaml | 3 +- .../Themes/Shared/RadioButton.axaml | 3 +- 4 files changed, 90 insertions(+), 88 deletions(-) diff --git a/src/Semi.Avalonia/Controls/CheckBox.axaml b/src/Semi.Avalonia/Controls/CheckBox.axaml index 5a6dce5..c8767ee 100644 --- a/src/Semi.Avalonia/Controls/CheckBox.axaml +++ b/src/Semi.Avalonia/Controls/CheckBox.axaml @@ -2,17 +2,27 @@ xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:CompileBindings="True"> + + + + Hello + Hello + Hello + Hello + + + - - + + @@ -175,14 +185,14 @@ - - + + - + - + + + - + + - @@ -397,7 +413,7 @@ - - - @@ -301,9 +295,6 @@ - @@ -312,9 +303,6 @@ - @@ -344,9 +332,6 @@ - @@ -356,9 +341,6 @@ - @@ -367,9 +349,6 @@ -