[Monaco]Make minimap toggleable (#33742)

This commit is contained in:
PesBandi
2025-01-14 12:47:53 +01:00
committed by GitHub
parent f11c885184
commit 80461c0241
16 changed files with 144 additions and 34 deletions

View File

@@ -202,6 +202,20 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
}
}
public bool SourceCodeMinimap
{
get => _peekPreviewSettings.SourceCodeMinimap.Value;
set
{
if (_peekPreviewSettings.SourceCodeMinimap.Value != value)
{
_peekPreviewSettings.SourceCodeMinimap.Value = value;
OnPropertyChanged(nameof(SourceCodeMinimap));
SavePreviewSettings();
}
}
}
private void NotifySettingsChanged()
{
// Using InvariantCulture as this is an IPC message

View File

@@ -95,6 +95,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
_monacoMaxFileSize = Settings.Properties.MonacoPreviewMaxFileSize.Value;
_monacoFontSize = Settings.Properties.MonacoPreviewFontSize.Value;
_monacoStickyScroll = Settings.Properties.MonacoPreviewStickyScroll;
_monacoMinimap = Settings.Properties.MonacoPreviewMinimap;
_pdfRenderEnabledGpoRuleConfiguration = GPOWrapper.GetConfiguredPdfPreviewEnabledValue();
if (_pdfRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Disabled || _pdfRenderEnabledGpoRuleConfiguration == GpoRuleConfigured.Enabled)
@@ -236,6 +237,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
private int _monacoMaxFileSize;
private bool _monacoStickyScroll;
private int _monacoFontSize;
private bool _monacoMinimap;
private GpoRuleConfigured _pdfRenderEnabledGpoRuleConfiguration;
private bool _pdfRenderEnabledStateIsGPOConfigured;
@@ -618,6 +620,20 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
}
}
public bool MonacoPreviewMinimap
{
get => _monacoMinimap;
set
{
if (_monacoMinimap != value)
{
_monacoMinimap = value;
Settings.Properties.MonacoPreviewMinimap = value;
RaisePropertyChanged();
}
}
}
public int MonacoPreviewFontSize
{
get