Fix BusyDecorator foreground color in dark mode

This commit is contained in:
ema
2026-04-17 10:37:04 +08:00
parent 669d7b60c4
commit e474c2f048
2 changed files with 5 additions and 8 deletions
@@ -11,9 +11,10 @@
<ControlTemplate TargetType="{x:Type Control}">
<busyDecorator:SpinIcon FontFamily="{StaticResource SegoeFluent}"
FontSize="40"
Spin="True">
&#xE72C;
</busyDecorator:SpinIcon>
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Opacity="0.9"
Spin="True"
Text="&#xE72C;" />
</ControlTemplate>
</Setter.Value>
</Setter>
+1 -5
View File
@@ -47,7 +47,6 @@ internal class SpinIcon : TextBlock, ISpinable
public bool Spin
{
get => (bool)GetValue(SpinProperty);
set => SetValue(SpinProperty, value);
}
@@ -64,9 +63,7 @@ internal class SpinIcon : TextBlock, ISpinable
private static void SpinDurationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var b = d as SpinIcon;
if (null == b || !b.Spin || !(e.NewValue is double) ||
if (d is not SpinIcon b || !b.Spin || e.NewValue is not double ||
e.NewValue.Equals(e.OldValue)) return;
b.StopSpin();
@@ -79,7 +76,6 @@ internal class SpinIcon : TextBlock, ISpinable
public double SpinDuration
{
get => (double)GetValue(SpinDurationProperty);
set => SetValue(SpinDurationProperty, value);
}