From f429d8219c0185769ceb2d99d936c53a46fbf1ce Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Thu, 27 Jul 2023 00:35:05 +0800 Subject: [PATCH] feat: add Icon style. --- demo/Ursa.Demo/Pages/DualBadgeDemo.axaml | 54 +++---------- src/Ursa.Themes.Semi/Controls/DualBadge.axaml | 75 +++++++------------ .../Themes/Dark/DualBadge.axaml | 6 +- .../Themes/Light/DualBadge.axaml | 6 +- .../Themes/Shared/DualBadge.axaml | 2 +- src/Ursa/Controls/DualBadge.cs | 8 ++ 6 files changed, 54 insertions(+), 97 deletions(-) diff --git a/demo/Ursa.Demo/Pages/DualBadgeDemo.axaml b/demo/Ursa.Demo/Pages/DualBadgeDemo.axaml index 453c5fe..fbb4738 100644 --- a/demo/Ursa.Demo/Pages/DualBadgeDemo.axaml +++ b/demo/Ursa.Demo/Pages/DualBadgeDemo.axaml @@ -14,13 +14,13 @@ - + - - + + 2.4k - - - - - - - + + + + 2.4k - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Ursa.Themes.Semi/Controls/DualBadge.axaml b/src/Ursa.Themes.Semi/Controls/DualBadge.axaml index 23db8eb..fa9a31f 100644 --- a/src/Ursa.Themes.Semi/Controls/DualBadge.axaml +++ b/src/Ursa.Themes.Semi/Controls/DualBadge.axaml @@ -5,13 +5,15 @@ + + + - @@ -19,17 +21,31 @@ HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}"> - + CornerRadius="{DynamicResource DualBadgeDefaultLeftCornerRadius}"> + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Ursa.Themes.Semi/Themes/Dark/DualBadge.axaml b/src/Ursa.Themes.Semi/Themes/Dark/DualBadge.axaml index 216f643..f1f8875 100644 --- a/src/Ursa.Themes.Semi/Themes/Dark/DualBadge.axaml +++ b/src/Ursa.Themes.Semi/Themes/Dark/DualBadge.axaml @@ -1,5 +1,7 @@  + White + White + #FF888D92 White #FF5DC264 - #FF888D92 - + \ No newline at end of file diff --git a/src/Ursa.Themes.Semi/Themes/Light/DualBadge.axaml b/src/Ursa.Themes.Semi/Themes/Light/DualBadge.axaml index 36d7c6c..a8ee239 100644 --- a/src/Ursa.Themes.Semi/Themes/Light/DualBadge.axaml +++ b/src/Ursa.Themes.Semi/Themes/Light/DualBadge.axaml @@ -1,5 +1,7 @@  + White + White + #FF6B7075 White #FF3BB346 - #FF6B7075 - + \ No newline at end of file diff --git a/src/Ursa.Themes.Semi/Themes/Shared/DualBadge.axaml b/src/Ursa.Themes.Semi/Themes/Shared/DualBadge.axaml index 9d476b4..ce2a09b 100644 --- a/src/Ursa.Themes.Semi/Themes/Shared/DualBadge.axaml +++ b/src/Ursa.Themes.Semi/Themes/Shared/DualBadge.axaml @@ -1,5 +1,5 @@  - 4 0 0 4 + 4 0 0 4 0 4 4 0 12 1 diff --git a/src/Ursa/Controls/DualBadge.cs b/src/Ursa/Controls/DualBadge.cs index 94f9664..de02345 100644 --- a/src/Ursa/Controls/DualBadge.cs +++ b/src/Ursa/Controls/DualBadge.cs @@ -32,6 +32,14 @@ public class DualBadge : HeaderedContentControl set => SetValue(IconTemplateProperty, value); } + public static readonly StyledProperty IconForegroundProperty = + AvaloniaProperty.Register(nameof(IconForeground)); + + public IBrush? IconForeground + { + get => GetValue(IconForegroundProperty); + set => SetValue(IconForegroundProperty, value); + } public static readonly StyledProperty HeaderForegroundProperty = AvaloniaProperty.Register(nameof(HeaderForeground));