[PreviewPane][Monaco]Format json/xml before rendering (#19980)

This commit is contained in:
Davide Giacometti
2022-08-24 13:08:10 +02:00
committed by GitHub
parent e7d3aadec3
commit 16c7a22410
10 changed files with 198 additions and 11 deletions

View File

@@ -51,6 +51,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
_mdRenderIsEnabled = Settings.Properties.EnableMdPreview;
_monacoRenderIsEnabled = Settings.Properties.EnableMonacoPreview;
_monacoWrapText = Settings.Properties.EnableMonacoPreviewWordWrap;
_monacoPreviewTryFormat = Settings.Properties.MonacoPreviewTryFormat;
_pdfRenderIsEnabled = Settings.Properties.EnablePdfPreview;
_gcodeRenderIsEnabled = Settings.Properties.EnableGcodePreview;
_pdfThumbnailIsEnabled = Settings.Properties.EnablePdfThumbnail;
@@ -63,6 +64,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
private bool _mdRenderIsEnabled;
private bool _monacoRenderIsEnabled;
private bool _monacoWrapText;
private bool _monacoPreviewTryFormat;
private bool _pdfRenderIsEnabled;
private bool _gcodeRenderIsEnabled;
private bool _svgThumbnailIsEnabled;
@@ -161,6 +163,24 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
}
}
public bool MonacoPreviewTryFormat
{
get
{
return _monacoPreviewTryFormat;
}
set
{
if (_monacoPreviewTryFormat != value)
{
_monacoPreviewTryFormat = value;
Settings.Properties.MonacoPreviewTryFormat = value;
RaisePropertyChanged();
}
}
}
public bool PDFRenderIsEnabled
{
get