mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-21 18:35:00 +00:00
code_review: PR #1423
Some checks are pending
Some checks are pending
Since we have already used `OnPropertyChanged`, move `ActualThemeVariantProperty` changed handler into it Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
e28b537f89
commit
dcdc52592c
1 changed files with 3 additions and 6 deletions
|
@ -42,11 +42,6 @@ namespace SourceGit.Views
|
|||
set => SetValue(ChangeProperty, value);
|
||||
}
|
||||
|
||||
public ChangeStatusIcon()
|
||||
{
|
||||
ActualThemeVariantChanged += (_, _) => InvalidateVisual();
|
||||
}
|
||||
|
||||
public override void Render(DrawingContext context)
|
||||
{
|
||||
if (Change == null || Bounds.Width <= 0)
|
||||
|
@ -87,7 +82,9 @@ namespace SourceGit.Views
|
|||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue