fix:屏蔽压感

This commit is contained in:
2025-10-02 17:04:12 +08:00
parent c347809eea
commit fa7c1fd646
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -1064,6 +1064,7 @@ namespace Ink_Canvas
if (!isLoaded) return; if (!isLoaded) return;
Settings.Canvas.DisablePressure = ToggleSwitchDisablePressure.IsOn; Settings.Canvas.DisablePressure = ToggleSwitchDisablePressure.IsOn;
inkCanvas.DefaultDrawingAttributes.IgnorePressure = Settings.Canvas.DisablePressure;
// 如果启用了屏蔽压感,则自动关闭压感触屏模式 // 如果启用了屏蔽压感,则自动关闭压感触屏模式
if (Settings.Canvas.DisablePressure && Settings.Canvas.EnablePressureTouchMode) if (Settings.Canvas.DisablePressure && Settings.Canvas.EnablePressureTouchMode)
@@ -652,6 +652,7 @@ namespace Ink_Canvas
// 初始化屏蔽压感开关状态 // 初始化屏蔽压感开关状态
ToggleSwitchDisablePressure.IsOn = Settings.Canvas.DisablePressure; ToggleSwitchDisablePressure.IsOn = Settings.Canvas.DisablePressure;
inkCanvas.DefaultDrawingAttributes.IgnorePressure = Settings.Canvas.DisablePressure;
ComboBoxPenStyle.SelectedIndex = Settings.Canvas.InkStyle; ComboBoxPenStyle.SelectedIndex = Settings.Canvas.InkStyle;
BoardComboBoxPenStyle.SelectedIndex = Settings.Canvas.InkStyle; BoardComboBoxPenStyle.SelectedIndex = Settings.Canvas.InkStyle;
+1 -1
View File
@@ -464,7 +464,7 @@ namespace Ink_Canvas
var strokeVisual = GetStrokeVisual(e.StylusDevice.Id); var strokeVisual = GetStrokeVisual(e.StylusDevice.Id);
var stylusPointCollection = e.GetStylusPoints(this); var stylusPointCollection = e.GetStylusPoints(this);
foreach (var stylusPoint in stylusPointCollection) foreach (var stylusPoint in stylusPointCollection)
strokeVisual.Add(new StylusPoint(stylusPoint.X, stylusPoint.Y, stylusPoint.PressureFactor)); strokeVisual.Add(new StylusPoint(stylusPoint.X, stylusPoint.Y, stylusPoint.PressureFactor));
strokeVisual.Redraw(); strokeVisual.Redraw();
} }
catch { } catch { }