From e474c2f048093ad1dd34cac0d5bdb348cfaf5bb4 Mon Sep 17 00:00:00 2001 From: ema Date: Fri, 17 Apr 2026 10:37:04 +0800 Subject: [PATCH] Fix BusyDecorator foreground color in dark mode --- QuickLook/Controls/BusyDecorator/BusyDecorator.xaml | 7 ++++--- QuickLook/Controls/BusyDecorator/SpinIcon.cs | 6 +----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/QuickLook/Controls/BusyDecorator/BusyDecorator.xaml b/QuickLook/Controls/BusyDecorator/BusyDecorator.xaml index 1666795..7b0d986 100644 --- a/QuickLook/Controls/BusyDecorator/BusyDecorator.xaml +++ b/QuickLook/Controls/BusyDecorator/BusyDecorator.xaml @@ -11,9 +11,10 @@ -  - + Foreground="{DynamicResource TextFillColorPrimaryBrush}" + Opacity="0.9" + Spin="True" + Text="" /> diff --git a/QuickLook/Controls/BusyDecorator/SpinIcon.cs b/QuickLook/Controls/BusyDecorator/SpinIcon.cs index fb59fdb..646b7e2 100644 --- a/QuickLook/Controls/BusyDecorator/SpinIcon.cs +++ b/QuickLook/Controls/BusyDecorator/SpinIcon.cs @@ -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); }