/ src / settings-ui / Settings.UI.Library / MousePointerCrosshairsProperties.cs
MousePointerCrosshairsProperties.cs
 1  // Copyright (c) Microsoft Corporation
 2  // The Microsoft Corporation licenses this file to you under the MIT license.
 3  // See the LICENSE file in the project root for more information.
 4  
 5  using System.Text.Json.Serialization;
 6  
 7  using Settings.UI.Library.Attributes;
 8  
 9  namespace Microsoft.PowerToys.Settings.UI.Library
10  {
11      public class MousePointerCrosshairsProperties
12      {
13          [CmdConfigureIgnore]
14          public HotkeySettings DefaultActivationShortcut => new HotkeySettings(true, false, true, false, 0x50); // Win + Alt + P
15  
16          [CmdConfigureIgnore]
17          public HotkeySettings DefaultGlidingCursorActivationShortcut => new HotkeySettings(true, false, true, false, 0xBE); // Win + Alt + .
18  
19          [JsonPropertyName("activation_shortcut")]
20          public HotkeySettings ActivationShortcut { get; set; }
21  
22          [JsonPropertyName("gliding_cursor_activation_shortcut")]
23          public HotkeySettings GlidingCursorActivationShortcut { get; set; }
24  
25          [JsonPropertyName("crosshairs_color")]
26          public StringProperty CrosshairsColor { get; set; }
27  
28          [JsonPropertyName("crosshairs_opacity")]
29          public IntProperty CrosshairsOpacity { get; set; }
30  
31          [JsonPropertyName("crosshairs_radius")]
32          public IntProperty CrosshairsRadius { get; set; }
33  
34          [JsonPropertyName("crosshairs_thickness")]
35          public IntProperty CrosshairsThickness { get; set; }
36  
37          [JsonPropertyName("crosshairs_border_color")]
38          public StringProperty CrosshairsBorderColor { get; set; }
39  
40          [JsonPropertyName("crosshairs_border_size")]
41          public IntProperty CrosshairsBorderSize { get; set; }
42  
43          [JsonPropertyName("crosshairs_orientation")]
44          public IntProperty CrosshairsOrientation { get; set; }
45  
46          [JsonPropertyName("crosshairs_auto_hide")]
47          public BoolProperty CrosshairsAutoHide { get; set; }
48  
49          [JsonPropertyName("crosshairs_is_fixed_length_enabled")]
50          public BoolProperty CrosshairsIsFixedLengthEnabled { get; set; }
51  
52          [JsonPropertyName("crosshairs_fixed_length")]
53          public IntProperty CrosshairsFixedLength { get; set; }
54  
55          [JsonPropertyName("auto_activate")]
56          public BoolProperty AutoActivate { get; set; }
57  
58          [JsonPropertyName("gliding_travel_speed")]
59          public IntProperty GlidingTravelSpeed { get; set; }
60  
61          [JsonPropertyName("gliding_delay_speed")]
62          public IntProperty GlidingDelaySpeed { get; set; }
63  
64          public MousePointerCrosshairsProperties()
65          {
66              ActivationShortcut = DefaultActivationShortcut;
67              GlidingCursorActivationShortcut = DefaultGlidingCursorActivationShortcut;
68              CrosshairsColor = new StringProperty("#FF0000");
69              CrosshairsOpacity = new IntProperty(75);
70              CrosshairsRadius = new IntProperty(20);
71              CrosshairsThickness = new IntProperty(5);
72              CrosshairsBorderColor = new StringProperty("#FFFFFF");
73              CrosshairsBorderSize = new IntProperty(1);
74              CrosshairsOrientation = new IntProperty(0); // Default to both (0=Both, 1=Vertical, 2=Horizontal)
75              CrosshairsAutoHide = new BoolProperty(false);
76              CrosshairsIsFixedLengthEnabled = new BoolProperty(false);
77              CrosshairsFixedLength = new IntProperty(1);
78              AutoActivate = new BoolProperty(false);
79              GlidingTravelSpeed = new IntProperty(25);
80              GlidingDelaySpeed = new IntProperty(5);
81          }
82      }
83  }