Skip to content

Commit 6089e6f

Browse files
Fix: Fixed an issue where tags would sometimes display with the wrong color (#16603)
1 parent d12b6ba commit 6089e6f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/Files.App.Controls/ThemedIcon/ThemedIcon.Properties.cs

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ protected virtual void OnOutlineIconPropertyChanged(string oldValue, string newV
3232
protected virtual void OnColorPropertyChanged(Brush oldValue, Brush newValue)
3333
{
3434
OnIconTypeChanged();
35+
OnIconColorChanged();
3536
}
3637

3738
protected virtual void OnIconTypePropertyChanged(ThemedIconTypes oldValue, ThemedIconTypes newValue)

src/Files.App.Controls/ThemedIcon/ThemedIcon.cs

+9
Original file line numberDiff line numberDiff line change
@@ -240,5 +240,14 @@ private void OnIsEnabledChanged(object sender, DependencyPropertyChangedEventArg
240240
{
241241
UpdateVisualStates();
242242
}
243+
244+
private void OnIconColorChanged()
245+
{
246+
if (GetTemplateChild(OutlineIconPath) is Path outlinePath)
247+
outlinePath.Fill = (Brush)this.GetValue(ColorProperty);
248+
249+
if (GetTemplateChild(FilledIconPath) is Path fillPath)
250+
fillPath.Fill = (Brush)this.GetValue(ColorProperty);
251+
}
243252
}
244253
}

0 commit comments

Comments
 (0)