2021-11-22 13:31:31 +00:00
|
|
|
|
// 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.Serialization;
|
2024-04-02 01:09:47 +02:00
|
|
|
|
using Settings.UI.Library.Attributes;
|
2021-11-22 13:31:31 +00:00
|
|
|
|
|
|
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Library
|
|
|
|
|
|
{
|
|
|
|
|
|
public class MouseHighlighterProperties
|
|
|
|
|
|
{
|
2024-04-02 01:09:47 +02:00
|
|
|
|
[CmdConfigureIgnore]
|
2023-06-20 15:42:04 +02:00
|
|
|
|
public HotkeySettings DefaultActivationShortcut => new HotkeySettings(true, false, false, true, 0x48);
|
|
|
|
|
|
|
2021-11-22 13:31:31 +00:00
|
|
|
|
[JsonPropertyName("activation_shortcut")]
|
|
|
|
|
|
public HotkeySettings ActivationShortcut { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("left_button_click_color")]
|
|
|
|
|
|
public StringProperty LeftButtonClickColor { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("right_button_click_color")]
|
|
|
|
|
|
public StringProperty RightButtonClickColor { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("highlight_opacity")]
|
2024-04-02 01:09:47 +02:00
|
|
|
|
[CmdConfigureIgnore]
|
2021-11-22 13:31:31 +00:00
|
|
|
|
public IntProperty HighlightOpacity { get; set; }
|
|
|
|
|
|
|
2023-07-26 23:48:00 +09:00
|
|
|
|
[JsonPropertyName("always_color")]
|
|
|
|
|
|
public StringProperty AlwaysColor { get; set; }
|
|
|
|
|
|
|
2021-11-22 13:31:31 +00:00
|
|
|
|
[JsonPropertyName("highlight_radius")]
|
|
|
|
|
|
public IntProperty HighlightRadius { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("highlight_fade_delay_ms")]
|
|
|
|
|
|
public IntProperty HighlightFadeDelayMs { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("highlight_fade_duration_ms")]
|
|
|
|
|
|
public IntProperty HighlightFadeDurationMs { get; set; }
|
|
|
|
|
|
|
2023-08-08 18:01:23 +02:00
|
|
|
|
[JsonPropertyName("auto_activate")]
|
|
|
|
|
|
public BoolProperty AutoActivate { get; set; }
|
|
|
|
|
|
|
2021-11-22 13:31:31 +00:00
|
|
|
|
public MouseHighlighterProperties()
|
|
|
|
|
|
{
|
2023-06-20 15:42:04 +02:00
|
|
|
|
ActivationShortcut = DefaultActivationShortcut;
|
2023-07-26 23:48:00 +09:00
|
|
|
|
LeftButtonClickColor = new StringProperty("#a6FFFF00");
|
|
|
|
|
|
RightButtonClickColor = new StringProperty("#a60000FF");
|
|
|
|
|
|
AlwaysColor = new StringProperty("#00FF0000");
|
|
|
|
|
|
HighlightOpacity = new IntProperty(166); // for migration from <=1.1 to 1.2
|
2021-11-22 13:31:31 +00:00
|
|
|
|
HighlightRadius = new IntProperty(20);
|
|
|
|
|
|
HighlightFadeDelayMs = new IntProperty(500);
|
|
|
|
|
|
HighlightFadeDurationMs = new IntProperty(250);
|
2023-08-08 18:01:23 +02:00
|
|
|
|
AutoActivate = new BoolProperty(false);
|
2021-11-22 13:31:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|