mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 02:06:36 +02:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user