code_review: PR #1423
Some checks are pending
Continuous Integration / Package (push) Blocked by required conditions
Continuous Integration / Build (push) Waiting to run
Continuous Integration / Prepare version string (push) Waiting to run
Localization Check / localization-check (push) Waiting to run

Since we have already used `OnPropertyChanged`, move `ActualThemeVariantProperty` changed handler into it

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-06-16 12:31:37 +08:00
parent e28b537f89
commit dcdc52592c
No known key found for this signature in database

View file

@ -42,11 +42,6 @@ namespace SourceGit.Views
set => SetValue(ChangeProperty, value); set => SetValue(ChangeProperty, value);
} }
public ChangeStatusIcon()
{
ActualThemeVariantChanged += (_, _) => InvalidateVisual();
}
public override void Render(DrawingContext context) public override void Render(DrawingContext context)
{ {
if (Change == null || Bounds.Width <= 0) if (Change == null || Bounds.Width <= 0)
@ -87,7 +82,9 @@ namespace SourceGit.Views
{ {
base.OnPropertyChanged(change); base.OnPropertyChanged(change);
if (change.Property == IsUnstagedChangeProperty || change.Property == ChangeProperty) if (change.Property == IsUnstagedChangeProperty ||
change.Property == ChangeProperty ||
(change.Property.Name == "ActualThemeVariant" && change.NewValue != null))
InvalidateVisual(); InvalidateVisual();
} }
} }