mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
feature: add a toggle button in Preference dialog to only use monospace font in code editor (#292)
This commit is contained in:
parent
d2d95e09b7
commit
aea61e0067
6 changed files with 26 additions and 2 deletions
|
@ -92,6 +92,22 @@ namespace SourceGit.ViewModels
|
|||
set => SetProperty(ref _monospaceFont, value);
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public FontFamily PrimaryFont
|
||||
{
|
||||
get => _onlyUseMonoFontInEditor ? _defaultFont : _monospaceFont;
|
||||
}
|
||||
|
||||
public bool OnlyUseMonoFontInEditor
|
||||
{
|
||||
get => _onlyUseMonoFontInEditor;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref _onlyUseMonoFontInEditor, value))
|
||||
OnPropertyChanged(nameof(PrimaryFont));
|
||||
}
|
||||
}
|
||||
|
||||
public double DefaultFontSize
|
||||
{
|
||||
get => _defaultFontSize;
|
||||
|
@ -486,6 +502,7 @@ namespace SourceGit.ViewModels
|
|||
private string _themeOverrides = string.Empty;
|
||||
private FontFamily _defaultFont = null;
|
||||
private FontFamily _monospaceFont = null;
|
||||
private bool _onlyUseMonoFontInEditor = false;
|
||||
private double _defaultFontSize = 13;
|
||||
private LayoutInfo _layout = new LayoutInfo();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue