fix: ui not updated after font changed

This commit is contained in:
leo 2024-07-30 10:29:07 +08:00
parent 9aa5787ce9
commit b18f86dde9
No known key found for this signature in database

View file

@ -83,13 +83,21 @@ namespace SourceGit.ViewModels
public FontFamily DefaultFont
{
get => _defaultFont;
set => SetProperty(ref _defaultFont, value);
set
{
if (SetProperty(ref _defaultFont, value) && _onlyUseMonoFontInEditor)
OnPropertyChanged(nameof(PrimaryFont));
}
}
public FontFamily MonospaceFont
{
get => _monospaceFont;
set => SetProperty(ref _monospaceFont, value);
set
{
if (SetProperty(ref _monospaceFont, value) && !_onlyUseMonoFontInEditor)
OnPropertyChanged(nameof(PrimaryFont));
}
}
[JsonIgnore]