From 3a6fe152ae516eb83d2fc102d799868b65977dbb Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Thu, 7 Nov 2024 20:42:28 +0800 Subject: [PATCH] feat: using RadioButton & CheckBox Resources instead of creating newly ListBox resources. (cherry picked from commit 8ba8ec69cafac2e55beeb32ba8340f16aa5ef2db) --- src/Semi.Avalonia/Controls/ListBox.axaml | 420 ++++++++---------- src/Semi.Avalonia/Themes/Dark/ListBox.axaml | 82 ---- src/Semi.Avalonia/Themes/Light/ListBox.axaml | 82 ---- src/Semi.Avalonia/Themes/Shared/ListBox.axaml | 43 -- 4 files changed, 188 insertions(+), 439 deletions(-) diff --git a/src/Semi.Avalonia/Controls/ListBox.axaml b/src/Semi.Avalonia/Controls/ListBox.axaml index 27b38a8..1056940 100644 --- a/src/Semi.Avalonia/Controls/ListBox.axaml +++ b/src/Semi.Avalonia/Controls/ListBox.axaml @@ -68,8 +68,7 @@ @@ -87,8 +86,7 @@ @@ -121,11 +119,11 @@ - - - - - + + + + + @@ -142,25 +140,25 @@ VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> - - @@ -264,12 +256,12 @@ - + - - - - + + + + @@ -293,30 +285,25 @@ @@ -329,11 +316,11 @@ - - - - - + + + + + @@ -351,29 +338,29 @@ + Margin="{DynamicResource RadioButtonIconMargin}"> @@ -498,11 +471,11 @@ - - - - - + + + + + @@ -523,40 +496,32 @@ TextWrapping="Wrap" /> - + @@ -574,11 +539,11 @@ - - - - - + + + + + @@ -595,23 +560,23 @@ VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> + Width="{DynamicResource CheckBoxBoxGlyphWidth}" + Height="{DynamicResource CheckBoxBoxGlyphHeight}" + Foreground="{DynamicResource CheckBoxGlyphFill}" /> @@ -752,11 +713,11 @@ - + - + - + @@ -774,27 +735,27 @@ + Margin="{DynamicResource CheckBoxBoxMargin}"> + Width="{DynamicResource CheckBoxBoxGlyphWidth}" + Height="{DynamicResource CheckBoxBoxGlyphHeight}" + Foreground="{DynamicResource CheckBoxGlyphFill}" /> - diff --git a/src/Semi.Avalonia/Themes/Dark/ListBox.axaml b/src/Semi.Avalonia/Themes/Dark/ListBox.axaml index 01b9e96..e1f4603 100644 --- a/src/Semi.Avalonia/Themes/Dark/ListBox.axaml +++ b/src/Semi.Avalonia/Themes/Dark/ListBox.axaml @@ -9,86 +9,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Semi.Avalonia/Themes/Light/ListBox.axaml b/src/Semi.Avalonia/Themes/Light/ListBox.axaml index 4305590..00b3b98 100644 --- a/src/Semi.Avalonia/Themes/Light/ListBox.axaml +++ b/src/Semi.Avalonia/Themes/Light/ListBox.axaml @@ -9,86 +9,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Semi.Avalonia/Themes/Shared/ListBox.axaml b/src/Semi.Avalonia/Themes/Shared/ListBox.axaml index edff407..a402804 100644 --- a/src/Semi.Avalonia/Themes/Shared/ListBox.axaml +++ b/src/Semi.Avalonia/Themes/Shared/ListBox.axaml @@ -3,47 +3,4 @@ 8 4 3 - - 16 - 6 - 14 - 0 2 0 0 - 8 0 0 0 - 3 - - - 3 - - 600 - 16 2 - 16 4 - 24 6 - - 12 - 12 - 14 - - - 16 12 - 3 - - - 14 - 16 - 16 - 10 - 10 - - 3 - 1 - 0 2 0 0 - 8 0 0 0 - - M17.4111 7.30848C18.0692 7.81171 18.1947 8.75312 17.6915 9.41119L11.1915 17.9112C10.909 18.2806 10.4711 18.4981 10.0061 18.5C9.54105 18.5019 9.10143 18.288 8.81592 17.9209L5.31592 13.4209C4.80731 12.767 4.92512 11.8246 5.57904 11.316C6.23296 10.8074 7.17537 10.9252 7.68398 11.5791L9.98988 14.5438L15.3084 7.58884C15.8116 6.93077 16.7531 6.80525 17.4111 7.30848Z - M5 12.5C5 11.6716 5.67157 11 6.5 11H17.5C18.3284 11 19 11.6716 19 12.5C19 13.3284 18.3284 14 17.5 14H6.5C5.67157 14 5 13.3284 5 12.5Z - - - 1 - 16 12 - 3 \ No newline at end of file