mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-05-07 02:00:21 +08:00
Fix BusyDecorator foreground color in dark mode
This commit is contained in:
@@ -11,9 +11,10 @@
|
||||
<ControlTemplate TargetType="{x:Type Control}">
|
||||
<busyDecorator:SpinIcon FontFamily="{StaticResource SegoeFluent}"
|
||||
FontSize="40"
|
||||
Spin="True">
|
||||

|
||||
</busyDecorator:SpinIcon>
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Opacity="0.9"
|
||||
Spin="True"
|
||||
Text="" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user