From 926ebc39da06cfd649a9394e96975203fcd34a3e Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Sun, 18 May 2025 14:56:23 +0800 Subject: [PATCH 1/6] misc: enhance Button styles. --- src/Semi.Avalonia/Controls/Button.axaml | 52 ++++++++++++------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/Semi.Avalonia/Controls/Button.axaml b/src/Semi.Avalonia/Controls/Button.axaml index 6345893..6814410 100644 --- a/src/Semi.Avalonia/Controls/Button.axaml +++ b/src/Semi.Avalonia/Controls/Button.axaml @@ -8,21 +8,21 @@ - - - - - + + + + + + - - - - - + + + + @@ -35,9 +35,9 @@ VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" BackgroundSizing="{TemplateBinding BackgroundSizing}" BorderThickness="{TemplateBinding BorderThickness}" + CornerRadius="{TemplateBinding CornerRadius}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" - CornerRadius="{TemplateBinding CornerRadius}" RecognizesAccessKey="True" TextElement.FontSize="{TemplateBinding FontSize}" TextElement.FontWeight="{TemplateBinding FontWeight}" @@ -46,42 +46,42 @@ - - - - - - @@ -254,13 +254,13 @@ BasedOn="{StaticResource {x:Type Button}}" TargetType="Button"> From 5148c62d24839cc67990ee3ab74e8659ef44f18b Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Sun, 18 May 2025 15:08:49 +0800 Subject: [PATCH 2/6] feat: refactor ToggleButton styles. --- src/Semi.Avalonia/Controls/ToggleButton.axaml | 342 +++++++----------- .../Themes/Dark/ToggleButton.axaml | 70 ---- .../Themes/HighContrast/ToggleButton.axaml | 27 -- .../Themes/Light/ToggleButton.axaml | 70 ---- 4 files changed, 124 insertions(+), 385 deletions(-) diff --git a/src/Semi.Avalonia/Controls/ToggleButton.axaml b/src/Semi.Avalonia/Controls/ToggleButton.axaml index 13aeb81..c91fef9 100644 --- a/src/Semi.Avalonia/Controls/ToggleButton.axaml +++ b/src/Semi.Avalonia/Controls/ToggleButton.axaml @@ -19,77 +19,10 @@ Toggle 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + - - - - - - - - - - + - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Semi.Avalonia/Themes/Dark/ToggleButton.axaml b/src/Semi.Avalonia/Themes/Dark/ToggleButton.axaml index 07ce7e9..3b747bc 100644 --- a/src/Semi.Avalonia/Themes/Dark/ToggleButton.axaml +++ b/src/Semi.Avalonia/Themes/Dark/ToggleButton.axaml @@ -1,75 +1,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Semi.Avalonia/Themes/HighContrast/ToggleButton.axaml b/src/Semi.Avalonia/Themes/HighContrast/ToggleButton.axaml index d4c78bf..177a891 100644 --- a/src/Semi.Avalonia/Themes/HighContrast/ToggleButton.axaml +++ b/src/Semi.Avalonia/Themes/HighContrast/ToggleButton.axaml @@ -1,30 +1,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Semi.Avalonia/Themes/Light/ToggleButton.axaml b/src/Semi.Avalonia/Themes/Light/ToggleButton.axaml index 07ce7e9..3b747bc 100644 --- a/src/Semi.Avalonia/Themes/Light/ToggleButton.axaml +++ b/src/Semi.Avalonia/Themes/Light/ToggleButton.axaml @@ -1,75 +1,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 37004426fd093710b96ac7e8638b2a72bfa08434 Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Sun, 18 May 2025 15:30:40 +0800 Subject: [PATCH 3/6] feat: refactor DropDownButton styles. --- .../Controls/DropDownButton.axaml | 232 ++++++++++-------- 1 file changed, 128 insertions(+), 104 deletions(-) diff --git a/src/Semi.Avalonia/Controls/DropDownButton.axaml b/src/Semi.Avalonia/Controls/DropDownButton.axaml index e53fdae..f9113b1 100644 --- a/src/Semi.Avalonia/Controls/DropDownButton.axaml +++ b/src/Semi.Avalonia/Controls/DropDownButton.axaml @@ -2,38 +2,44 @@ xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:CompileBindings="True"> + + + + + + + + + + + - - - - - - + + + + + + - - + + + - - + - + - - - - - - - - - - - - - - - @@ -127,162 +120,193 @@ - - - + + + - - + + - - + - - + - - + - - + - - - - + - - - - + + + - - - - + - - + \ No newline at end of file From 2e157b39bb2ebc4cdab7cf1dea899df64164ab08 Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Sun, 18 May 2025 16:02:18 +0800 Subject: [PATCH 4/6] feat: enhance SplitButton styles. --- src/Semi.Avalonia/Controls/SplitButton.axaml | 62 ++++++++++++-------- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/src/Semi.Avalonia/Controls/SplitButton.axaml b/src/Semi.Avalonia/Controls/SplitButton.axaml index 1e50f72..a7e79d8 100644 --- a/src/Semi.Avalonia/Controls/SplitButton.axaml +++ b/src/Semi.Avalonia/Controls/SplitButton.axaml @@ -20,10 +20,10 @@ - - - + + + @@ -38,13 +38,13 @@ VerticalAlignment="{TemplateBinding VerticalAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" - Background="{TemplateBinding Background}" BackgroundSizing="{TemplateBinding BackgroundSizing}" + Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" + CornerRadius="{TemplateBinding CornerRadius}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" - CornerRadius="{TemplateBinding CornerRadius}" RecognizesAccessKey="True" TextElement.FontSize="{TemplateBinding FontSize}" TextElement.FontWeight="{TemplateBinding FontWeight}" @@ -54,20 +54,22 @@ - - - - - - + + + + + + - - - + - + + + + + - + + @@ -152,8 +157,8 @@ Classes="Solid" /> - + @@ -162,6 +167,15 @@ + + + @@ -315,8 +329,8 @@ @@ -344,9 +358,9 @@ @@ -359,9 +373,9 @@ \ No newline at end of file From 55654c16ae97aa3d613abedc87d6d6cfac62760b Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Sun, 18 May 2025 16:20:57 +0800 Subject: [PATCH 5/6] feat: enhance ToggleSwitch styles. --- src/Semi.Avalonia/Controls/ToggleSwitch.axaml | 60 +++++++------------ 1 file changed, 22 insertions(+), 38 deletions(-) diff --git a/src/Semi.Avalonia/Controls/ToggleSwitch.axaml b/src/Semi.Avalonia/Controls/ToggleSwitch.axaml index 8c0bafc..8171df2 100644 --- a/src/Semi.Avalonia/Controls/ToggleSwitch.axaml +++ b/src/Semi.Avalonia/Controls/ToggleSwitch.axaml @@ -114,20 +114,6 @@ - - - @@ -208,6 +194,16 @@ - @@ -372,24 +354,26 @@ + + + + + + + - - - + + + - - - + - - - Date: Mon, 19 May 2025 15:29:37 +0800 Subject: [PATCH 6/6] fix: using DockPanel. --- .../Controls/DropDownButton.axaml | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/Semi.Avalonia/Controls/DropDownButton.axaml b/src/Semi.Avalonia/Controls/DropDownButton.axaml index f9113b1..9f80d17 100644 --- a/src/Semi.Avalonia/Controls/DropDownButton.axaml +++ b/src/Semi.Avalonia/Controls/DropDownButton.axaml @@ -37,7 +37,17 @@ Padding="{TemplateBinding Padding}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"> - + + - - +