Skip to content

Improve touchpad scrolling with kinetic momentum - #42

Open
kevinherron wants to merge 1 commit into
omacom:masterfrom
kevinherron:codex/touchpad-scrolling
Open

Improve touchpad scrolling with kinetic momentum#42
kevinherron wants to merge 1 commit into
omacom:masterfrom
kevinherron:codex/touchpad-scrolling

Conversation

@kevinherron

Copy link
Copy Markdown

Pixel-precise touchpad scrolling currently applies raw deltas directly, so movement feels slow and stops abruptly when the fingers lift. This change scales touchpad movement by 2× and estimates gesture velocity to provide bounded, decaying momentum after ScrollEnd or a short event gap.

Platform-provided Qt.ScrollMomentum events take precedence over the fallback momentum to prevent double scrolling. New gestures, mouse-wheel input, other movement, and content bounds stop momentum cleanly. The existing animated angleDelta mouse-wheel behavior remains intact.

The integration test sends phased QWheelEvent pixel deltas and verifies scaled movement, continued movement after release, and the platform-momentum handoff.

Scale pixel-precise movement and preserve gesture velocity after release.
Use platform momentum when available and bound the fallback coast.
@kevinherron

Copy link
Copy Markdown
Author

Sample size of 1 when it comes to testing this change on a physical touchpad.

Works great on my old ThinkPad X1 Carbon Gen 6. I'll test on my XPS 14 when it gets here next week.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant