From 8f4c727d5ec232a756cff1e3b86f7675f67ab83c Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Mon, 26 Feb 2024 17:52:45 +0800 Subject: [PATCH] fix: BadgeContentForeground. --- demo/Ursa.Demo/Pages/BadgeDemo.axaml | 204 +++++++++++++----- src/Ursa.Themes.Semi/Controls/Badge.axaml | 72 ++++--- src/Ursa.Themes.Semi/Themes/Dark/Badge.axaml | 1 + src/Ursa.Themes.Semi/Themes/Light/Badge.axaml | 1 + 4 files changed, 190 insertions(+), 88 deletions(-) diff --git a/demo/Ursa.Demo/Pages/BadgeDemo.axaml b/demo/Ursa.Demo/Pages/BadgeDemo.axaml index 88254c0..4c97eb3 100644 --- a/demo/Ursa.Demo/Pages/BadgeDemo.axaml +++ b/demo/Ursa.Demo/Pages/BadgeDemo.axaml @@ -5,8 +5,8 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:u="https://irihi.tech/ursa" - d:DesignHeight="1000" - d:DesignWidth="800" + d:DesignHeight="850" + d:DesignWidth="850" mc:Ignorable="d"> - + @@ -29,26 +33,38 @@ HorizontalAlignment="Center" Header="500" OverflowCount="100"> - + + + - + + + - + + + - + + + - + + + - + + + @@ -56,88 +72,134 @@ Header="VIP" CornerPosition="TopLeft" Dot="True"> - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + @@ -145,37 +207,49 @@ Header="URSA" Classes="Primary" Dot="True"> - + + + - + + + - + + + - + + + - + + + - + + + @@ -183,37 +257,49 @@ Header="URSA" Classes="Light Primary" Dot="True"> - + + + - + + + - + + + - + + + - + + + - + + + @@ -222,37 +308,49 @@ Header="URSA" Classes="Inverted Primary" Dot="True"> - + + + - + + + - + + + - + + + - + + + - + + + diff --git a/src/Ursa.Themes.Semi/Controls/Badge.axaml b/src/Ursa.Themes.Semi/Controls/Badge.axaml index 2be2ba7..fc34f88 100644 --- a/src/Ursa.Themes.Semi/Controls/Badge.axaml +++ b/src/Ursa.Themes.Semi/Controls/Badge.axaml @@ -32,7 +32,8 @@ HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" Content="{TemplateBinding Content}" - ContentTemplate="{TemplateBinding ContentTemplate}" /> + ContentTemplate="{TemplateBinding ContentTemplate}" + Foreground="{DynamicResource BadgeContentForeground}"/> + ContentTemplate="{TemplateBinding ContentTemplate}" + Foreground="{DynamicResource BadgeContentForeground}"/> diff --git a/src/Ursa.Themes.Semi/Themes/Dark/Badge.axaml b/src/Ursa.Themes.Semi/Themes/Dark/Badge.axaml index 93181ae..37c6584 100644 --- a/src/Ursa.Themes.Semi/Themes/Dark/Badge.axaml +++ b/src/Ursa.Themes.Semi/Themes/Dark/Badge.axaml @@ -1,6 +1,7 @@ + diff --git a/src/Ursa.Themes.Semi/Themes/Light/Badge.axaml b/src/Ursa.Themes.Semi/Themes/Light/Badge.axaml index 6128269..403f137 100644 --- a/src/Ursa.Themes.Semi/Themes/Light/Badge.axaml +++ b/src/Ursa.Themes.Semi/Themes/Light/Badge.axaml @@ -1,6 +1,7 @@ +