mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[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:
@@ -0,0 +1,15 @@
|
||||
// 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.
|
||||
|
||||
namespace Settings.UI.Library.Enumerations
|
||||
{
|
||||
public enum MeasureToolMeasureStyle
|
||||
{
|
||||
None,
|
||||
Bounds,
|
||||
Spacing,
|
||||
HorizontalSpacing,
|
||||
VerticalSpacing,
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user