Skip to content

Fix scroll remainder accumulation in AxisGesture#558

Open
klopyrev wants to merge 1 commit into
PixlOne:mainfrom
klopyrev:fix-scroll-accumulation
Open

Fix scroll remainder accumulation in AxisGesture#558
klopyrev wants to merge 1 commit into
PixlOne:mainfrom
klopyrev:fix-scroll-accumulation

Conversation

@klopyrev
Copy link
Copy Markdown

Summary

This PR fixes a bug in AxisGesture where the fractional remainder of scroll movements (_axis_remainder) is calculated and saved but never added back to the movement delta of subsequent scroll events.

Why this is needed

When a small axis_multiplier (such as 0.1 or 0.07) is used with high-resolution scrolling, individual scroll events are scaled down to fractional values less than 1.0 (e.g., 0.8). Because the remainder is never accumulated, floor() truncates all movements to 0, making the scroll wheel completely unresponsive (dead) at slow scrolling speeds.
By adding move += _axis_remainder; before calculating move_floor, fractional scroll inputs successfully pool together and trigger scroll ticks as expected, allowing users to configure slow, comfortable scroll speeds without losing precision.

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