PeekProperties.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; 6 7 using Settings.UI.Library.Attributes; 8 9 namespace Microsoft.PowerToys.Settings.UI.Library 10 { 11 public class PeekProperties 12 { 13 [CmdConfigureIgnore] 14 public HotkeySettings DefaultActivationShortcut => new HotkeySettings(false, true, false, false, 0x20); 15 16 public PeekProperties() 17 { 18 ActivationShortcut = DefaultActivationShortcut; 19 AlwaysRunNotElevated = new BoolProperty(true); 20 CloseAfterLosingFocus = new BoolProperty(false); 21 ConfirmFileDelete = new BoolProperty(true); 22 EnableSpaceToActivate = new BoolProperty(true); // Toggle is ON by default for new users. No impact on existing users. 23 } 24 25 public HotkeySettings ActivationShortcut { get; set; } 26 27 public BoolProperty AlwaysRunNotElevated { get; set; } 28 29 public BoolProperty CloseAfterLosingFocus { get; set; } 30 31 public BoolProperty ConfirmFileDelete { get; set; } 32 33 public BoolProperty EnableSpaceToActivate { get; set; } 34 35 public override string ToString() => JsonSerializer.Serialize(this, SettingsSerializationContext.Default.PeekProperties); 36 } 37 }