mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
[DevFiles]Update Monaco dependency to 0.47, new sticky scroll setting (#32410)
* Update Monaco dependency to 0.47 * Add setting to enable/disable it and add Peek support * Fix Xaml styling
This commit is contained in:
committed by
GitHub
parent
af5293cfb4
commit
05249ac432
@@ -398,6 +398,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Monaco
|
||||
_html = _html.Replace("[[PT_WRAP]]", _settings.Wrap ? "1" : "0", StringComparison.InvariantCulture);
|
||||
_html = _html.Replace("[[PT_THEME]]", Settings.GetTheme(), StringComparison.InvariantCulture);
|
||||
_html = _html.Replace("[[PT_CODE]]", _base64FileCode, StringComparison.InvariantCulture);
|
||||
_html = _html.Replace("[[PT_STICKY_SCROLL]]", _settings.StickyScroll ? "1" : "0", StringComparison.InvariantCulture);
|
||||
_html = _html.Replace("[[PT_URL]]", FilePreviewCommon.MonacoHelper.VirtualHostName, StringComparison.InvariantCulture);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,26 @@ namespace Microsoft.PowerToys.PreviewHandler.Monaco
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether sticky scroll should be enabled. Set by PT settings.
|
||||
/// </summary>
|
||||
public bool StickyScroll
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
return moduleSettings.GetSettings<PowerPreviewSettings>(PowerPreviewSettings.ModuleName).Properties.MonacoPreviewStickyScroll;
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
// Couldn't read the settings.
|
||||
// Assume default of true.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the color of the window background.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user