[Dev file previewer]Add option to set custom max file size and fix styling issue (#23689)

* [Dev file previewer] Add option to set costum max file size and fix style issue
This commit is contained in:
Aaron Junker
2023-02-13 19:57:33 +01:00
committed by GitHub
parent bc4bde8cee
commit 00e10d38c2
6 changed files with 63 additions and 4 deletions

View File

@@ -98,6 +98,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
_monacoWrapText = Settings.Properties.EnableMonacoPreviewWordWrap;
_monacoPreviewTryFormat = Settings.Properties.MonacoPreviewTryFormat;
_monacoMaxFileSize = Settings.Properties.MonacoPreviewMaxFileSize.Value;
_pdfRenderEnabledGpoRuleConfiguration = GPOWrapper.GetConfiguredPdfPreviewEnabledValue();
if (_pdfRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled || _pdfRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled)
@@ -175,6 +176,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
private bool _monacoRenderIsEnabled;
private bool _monacoWrapText;
private bool _monacoPreviewTryFormat;
private int _monacoMaxFileSize;
private GpoRuleConfigured _pdfRenderEnabledGpoRuleConfiguration;
private bool _pdfRenderEnabledStateIsGPOConfigured;
@@ -353,6 +355,24 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
}
}
public int MonacoPreviewMaxFileSize
{
get
{
return _monacoMaxFileSize;
}
set
{
if (_monacoMaxFileSize != value)
{
_monacoMaxFileSize = value;
Settings.Properties.MonacoPreviewMaxFileSize.Value = value;
RaisePropertyChanged();
}
}
}
public bool PDFRenderIsEnabled
{
get