Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions TextControlBox/Core/PointerActionsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,11 @@ public void PointerWheelAction(ZoomManager zoomManager, PointerRoutedEventArgs e
{
var delta = e.GetCurrentPoint(coreTextbox.canvasSelection).Properties.MouseWheelDelta;
bool needsUpdate = false;
//Zoom using mousewheel
if (Utils.IsKeyPressed(VirtualKey.Control))
//Zoom using mousewheel or a precision-touchpad pinch. A pinch gesture is delivered by
//Windows as a Ctrl-modified wheel, but that Control comes from the wheel message
//(e.KeyModifiers), not the physical keyboard state, so Utils.IsKeyPressed alone misses it.
//Check both so pinch-to-zoom works on precision touchpads.
if (Utils.IsKeyPressed(VirtualKey.Control) || e.KeyModifiers.HasFlag(VirtualKeyModifiers.Control))
{
zoomManager._ZoomFactor += delta / 20;
zoomManager.UpdateZoom();
Expand Down