[MeasureTool]Add setting to specify the default measure style (#25645)

* MeasureTool: Add possibility to specify the default measure style

* MeasureTool: Improve description of user setting

* MeasureTool: Use enum value instead of magic number
This commit is contained in:
Sebastian Zanoni
2023-04-27 16:38:24 +02:00
committed by GitHub
parent 4af9f0172d
commit 78d705890a
9 changed files with 130 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using Settings.UI.Library.Enumerations;
namespace Microsoft.PowerToys.Settings.UI.Library
{
@@ -18,6 +19,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
DrawFeetOnCross = true;
PerColorChannelEdgeDetection = false;
MeasureCrossColor = new StringProperty("#FF4500");
DefaultMeasureStyle = new IntProperty((int)MeasureToolMeasureStyle.None);
}
public HotkeySettings ActivationShortcut { get; set; }
@@ -37,6 +39,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library
public StringProperty MeasureCrossColor { get; set; }
public IntProperty DefaultMeasureStyle { get; set; }
public override string ToString() => JsonSerializer.Serialize(this);
}
}