Skip to content

Commit

Permalink
Fix: Fixed an issue where tags would sometimes display with the wrong…
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrariofilippo authored Dec 17, 2024
1 parent d12b6ba commit 6089e6f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Files.App.Controls/ThemedIcon/ThemedIcon.Properties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ protected virtual void OnOutlineIconPropertyChanged(string oldValue, string newV
protected virtual void OnColorPropertyChanged(Brush oldValue, Brush newValue)
{
OnIconTypeChanged();
OnIconColorChanged();
}

protected virtual void OnIconTypePropertyChanged(ThemedIconTypes oldValue, ThemedIconTypes newValue)
Expand Down
9 changes: 9 additions & 0 deletions src/Files.App.Controls/ThemedIcon/ThemedIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,14 @@ private void OnIsEnabledChanged(object sender, DependencyPropertyChangedEventArg
{
UpdateVisualStates();
}

private void OnIconColorChanged()
{
if (GetTemplateChild(OutlineIconPath) is Path outlinePath)
outlinePath.Fill = (Brush)this.GetValue(ColorProperty);

if (GetTemplateChild(FilledIconPath) is Path fillPath)
fillPath.Fill = (Brush)this.GetValue(ColorProperty);
}
}
}

0 comments on commit 6089e6f

Please sign in to comment.