Skip to content

Comments

add touchpad pinch zoom and two-finger pan#20356

Open
nevotgnab wants to merge 2 commits intodarktable-org:masterfrom
nevotgnab:trackpad-darkroom-gestures
Open

add touchpad pinch zoom and two-finger pan#20356
nevotgnab wants to merge 2 commits intodarktable-org:masterfrom
nevotgnab:trackpad-darkroom-gestures

Conversation

@nevotgnab
Copy link

@nevotgnab nevotgnab commented Feb 16, 2026

Closes #18048

Adds touchpad gesture support in Darkroom:

  • pinch gesture zoom in/out
  • two-finger pan

Implementation keeps existing layering:

  • GTK collects gesture events
  • view manager dispatches to current view
  • behavior is implemented only in Darkroom view

Existing mouse wheel scroll path is unchanged, so non-touchpad scroll behavior remains intact.

[Update] Two-finger pan is also gated in darkroom states where scroll is used for mask/brush interactions (e.g. brush size), to preserve existing editing behavior.

gesture

@nevotgnab nevotgnab marked this pull request as ready for review February 16, 2026 07:23
@nevotgnab nevotgnab marked this pull request as draft February 16, 2026 08:50
@nevotgnab nevotgnab force-pushed the trackpad-darkroom-gestures branch from a44f0e8 to ac46abd Compare February 16, 2026 08:58
@nevotgnab nevotgnab marked this pull request as ready for review February 16, 2026 09:00
@zisoft zisoft linked an issue Feb 16, 2026 that may be closed by this pull request
@nevotgnab
Copy link
Author

touchpad pan currently conflicts with brush-size scroll.
switching to draft while fixing it.

@nevotgnab nevotgnab marked this pull request as draft February 17, 2026 05:44
@nevotgnab
Copy link
Author

  • During testing, I found a conflict: two-finger pan could consume scroll input needed by mask/brush interactions (e.g. brush size).
  • This PR now avoids consuming pan in those darkroom states, so brush/mask scroll behavior is preserved.
  • With this adjustment, the PR is ready for review/merge in its current scope.
  • Broader pan-vs-scroll priority tuning in ambiguous contexts can be explored in a separate follow-up.

@nevotgnab nevotgnab marked this pull request as ready for review February 17, 2026 05:55
@TurboGit TurboGit added this to the 5.6 milestone Feb 20, 2026
@TurboGit TurboGit self-requested a review February 20, 2026 17:05
@TurboGit TurboGit added priority: low core features work as expected, only secondary/optional features don't feature: new new features to add scope: UI user interface and interactions documentation-pending a documentation work is required release notes: pending labels Feb 20, 2026
Copy link
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice ! The panning is very slow on my side because it seems the sensitivity is low... So almost unusable. Any idea?

{
if(!vm->current_view)
return FALSE;
if(vm->current_view->gesture_pan)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to have a clear flow to me:

if
...
else if
...
else
...

const double scale,
const int state)
{
if(!vm->current_view)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

likewise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation-pending a documentation work is required feature: new new features to add priority: low core features work as expected, only secondary/optional features don't release notes: pending scope: UI user interface and interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MacOS Trackpad compatibility Add pinch to zoom in and out for trackpads/touchpads

2 participants