diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml index 86d73b04..e3f13080 100644 --- a/Ink Canvas/MainWindow.xaml +++ b/Ink Canvas/MainWindow.xaml @@ -440,6 +440,7 @@ + diff --git a/Ink Canvas/MainWindow.xaml.cs b/Ink Canvas/MainWindow.xaml.cs index b7b49e90..6dca6211 100644 --- a/Ink Canvas/MainWindow.xaml.cs +++ b/Ink Canvas/MainWindow.xaml.cs @@ -926,6 +926,18 @@ private void LoadSettings(bool isStartup = true) { Settings.Gesture = new Gesture(); } + if (Settings.Gesture.IsDisableLockSmithByDefault) + { + ToggleSwitchDisableLockSmithByDefault.IsOn = true; + _lockSmith = false; + LockSmithSymbol.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.Pin; + } + else + { + ToggleSwitchDisableLockSmithByDefault.IsOn = false; + _lockSmith = true; + LockSmithSymbol.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.UnPin; + } if (Settings.Gesture.IsEnableTwoFingerZoom) { ToggleSwitchEnableTwoFingerZoom.IsOn = true; @@ -3297,8 +3309,15 @@ private void ToggleSwitchEnableFingerGestureSlideShowControl_Toggled(object send SaveSettingsToFile(); } - private void ToggleSwitchEnableTwoFingerZoom_Toggled(object sender, RoutedEventArgs e) - { + private void ToggleSwitchDisableLockSmithByDefault_Toggled(object sender, RoutedEventArgs e) { + if (!isLoaded) return; + + Settings.Gesture.IsDisableLockSmithByDefault = ToggleSwitchDisableLockSmithByDefault.IsOn; + + SaveSettingsToFile(); + } + + private void ToggleSwitchEnableTwoFingerZoom_Toggled(object sender, RoutedEventArgs e) { if (!isLoaded) return; Settings.Gesture.IsEnableTwoFingerZoom = ToggleSwitchEnableTwoFingerZoom.IsOn; diff --git a/Ink Canvas/Settings.cs b/Ink Canvas/Settings.cs index 20a8e358..68151403 100644 --- a/Ink Canvas/Settings.cs +++ b/Ink Canvas/Settings.cs @@ -55,6 +55,8 @@ public class Gesture { [JsonIgnore] public bool IsEnableTwoFingerGesture => IsEnableTwoFingerZoom || IsEnableTwoFingerTranslate || IsEnableTwoFingerRotation; + [JsonProperty("isDisableLockSmithByDefault")] + public bool IsDisableLockSmithByDefault { get; set; } = true; [JsonProperty("isEnableTwoFingerZoom")] public bool IsEnableTwoFingerZoom { get; set; } = true; [JsonProperty("isEnableTwoFingerTranslate")]