-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Fix Scrollbar
thumb drag behavior on desktop.
#111250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Scrollbar
thumb drag behavior on desktop.
#111250
Conversation
cc: @werainkhatri |
hey! ya it's in my to-do. am a little busy this week. will try to pick it up if a get a bit of time. hope that's okay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked this out today and played around with it. Very nice, elegant.
_thumbPressVertical = localPosition.dy - scrollbarPainter._thumbOffset; | ||
_thumbPressHorizontal = localPosition.dx - scrollbarPainter._thumbOffset; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to keep track of both the horizontal and the vertical? Or just the axis we care about? It looks like you filter for it later in handleThumbPressUpdate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea, I cleaned this up.
But for some reason, the golden file change message is thrown. This shouldn't have any golden changes AFAIK.
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. Changes reported for pull request #111250 at sha bf99455316929e0ebd51bf9a5ef73ff34d3f10e2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM! Thanks!
The golden file change is not related to your PR. That test has been flaky and should be skipped now if you update your branch. We are tracking that in a separate issue as well - sorry for the inconvenience!
bf99455
to
441491d
Compare
fixes #107765
macOS
,Windows
, andLinux
support dragging scrollbar from only where the thumb is pressed.Demo: #108166 (comment)
Code Sample
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.