mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[Monaco]Add option to set font size (#32559)
* Add setting to enable/disable it and add Peek support * Add ability to set font size
This commit is contained in:
committed by
GitHub
parent
5b4da37a43
commit
d9008186cf
@@ -173,6 +173,20 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public int SourceCodeFontSize
|
||||
{
|
||||
get => _peekPreviewSettings.SourceCodeFontSize.Value;
|
||||
set
|
||||
{
|
||||
if (_peekPreviewSettings.SourceCodeFontSize.Value != value)
|
||||
{
|
||||
_peekPreviewSettings.SourceCodeFontSize.Value = value;
|
||||
OnPropertyChanged(nameof(SourceCodeFontSize));
|
||||
SavePreviewSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool SourceCodeStickyScroll
|
||||
{
|
||||
get => _peekPreviewSettings.SourceCodeStickyScroll.Value;
|
||||
|
||||
@@ -92,6 +92,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
_monacoWrapText = Settings.Properties.EnableMonacoPreviewWordWrap;
|
||||
_monacoPreviewTryFormat = Settings.Properties.MonacoPreviewTryFormat;
|
||||
_monacoMaxFileSize = Settings.Properties.MonacoPreviewMaxFileSize.Value;
|
||||
_monacoFontSize = Settings.Properties.MonacoPreviewFontSize.Value;
|
||||
_monacoStickyScroll = Settings.Properties.MonacoPreviewStickyScroll;
|
||||
|
||||
_pdfRenderEnabledGpoRuleConfiguration = GPOWrapper.GetConfiguredPdfPreviewEnabledValue();
|
||||
@@ -233,6 +234,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
private bool _monacoPreviewTryFormat;
|
||||
private int _monacoMaxFileSize;
|
||||
private bool _monacoStickyScroll;
|
||||
private int _monacoFontSize;
|
||||
|
||||
private GpoRuleConfigured _pdfRenderEnabledGpoRuleConfiguration;
|
||||
private bool _pdfRenderEnabledStateIsGPOConfigured;
|
||||
@@ -615,6 +617,24 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public int MonacoPreviewFontSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return _monacoFontSize;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (_monacoFontSize != value)
|
||||
{
|
||||
_monacoFontSize = value;
|
||||
Settings.Properties.MonacoPreviewFontSize.Value = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool PDFRenderIsEnabled
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user