Merge pull request #383 from gadfly3173/fix/counter-visual

fix: invalidate counter visual (#338)
This commit is contained in:
leo 2024-08-21 11:28:06 +08:00 committed by GitHub
commit 19924930bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,11 +63,6 @@ namespace SourceGit.Views
FontFamilyProperty, FontFamilyProperty,
ForegroundProperty, ForegroundProperty,
CountProperty); CountProperty);
AffectsRender<CounterPresenter>(
ForegroundProperty,
BackgroundProperty,
CountProperty);
} }
public override void Render(DrawingContext context) public override void Render(DrawingContext context)
@ -98,6 +93,7 @@ namespace SourceGit.Views
_label = null; _label = null;
} }
InvalidateVisual();
return _label != null ? new Size(_label.Width + 18, 18) : new Size(0, 0); return _label != null ? new Size(_label.Width + 18, 18) : new Size(0, 0);
} }