mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[Peek]Add wrap and formatting options for Monaco previewer (#29378)
* add options for monaco previewer * fix formatting
This commit is contained in:
committed by
GitHub
parent
9693fd7035
commit
5a06bcb473
40
src/settings-ui/Settings.UI.Library/PeekPreviewSettings.cs
Normal file
40
src/settings-ui/Settings.UI.Library/PeekPreviewSettings.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Text.Json;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
||||
|
||||
namespace Settings.UI.Library
|
||||
{
|
||||
public class PeekPreviewSettings : ISettingsConfig
|
||||
{
|
||||
public const string FileName = "preview-settings.json";
|
||||
|
||||
public BoolProperty SourceCodeWrapText { get; set; }
|
||||
|
||||
public BoolProperty SourceCodeTryFormat { get; set; }
|
||||
|
||||
public PeekPreviewSettings()
|
||||
{
|
||||
SourceCodeWrapText = new BoolProperty(false);
|
||||
SourceCodeTryFormat = new BoolProperty(false);
|
||||
}
|
||||
|
||||
public string ToJsonString()
|
||||
{
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
|
||||
public string GetModuleName()
|
||||
{
|
||||
return PeekSettings.ModuleName;
|
||||
}
|
||||
|
||||
public bool UpgradeSettingsConfiguration()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user