You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider option to defer painter updates during drag on scrollbar thumb #121574
#121786 resolved the original issue in accordance with native behavior, but I am leaving this open to see if folks want the option for the first idea we had for this. If you would like the option to have the scrollbar update after the drag is released, add a 👍
I suspect (if the scrollbar is being dragged) that the scroll metrics are being updated while drag is active on the scrollbar, leading to the jumpy behavior in the video. The list is not a fixed extent list, so as items are being added, the max scroll extent is changing in real time.
If so, we should defer updating the scrollbar with new metrics until after dragging ends to the user does not get flung around while holding onto the scrollbar.
I believe that's correct. I traced the code a little and the jumpiness corresponds to big updates to the ScrollMetrics minScrollExtents property which occur while the thumb is being dragged.
I think the behavior is more pronounced since #111250
IIRC, before then, it was possible for the mouse pointer to be separated from the thumb. Since that change, they are kept together.
I think just deferring an update to the scrollbar painter until the drag gesture ends is the right approach here. @TahaTesser do you agree?
If so I can send a PR right quick for this.
I think just deferring an update to the scrollbar painter until the drag gesture ends is the right approach here. @TahaTesser do you agree?
If so I can send a PR right quick for this.
changed the title [-]Defer painter updates during drag on scrollbar thumb[/-][+]Consider option to defer painter updates during drag on scrollbar thumb[/+]on Mar 9, 2023
Activity
HansMuller commentedon Feb 28, 2023
I believe that's correct. I traced the code a little and the jumpiness corresponds to big updates to the ScrollMetrics minScrollExtents property which occur while the thumb is being dragged.
Piinks commentedon Feb 28, 2023
I think the behavior is more pronounced since #111250
IIRC, before then, it was possible for the mouse pointer to be separated from the thumb. Since that change, they are kept together.
I think just deferring an update to the scrollbar painter until the drag gesture ends is the right approach here. @TahaTesser do you agree?
If so I can send a PR right quick for this.
TahaTesser commentedon Feb 28, 2023
My PR #111250 was reverted and then @xu-baolin took it over in #112434.
Sounds good
Piinks commentedon Feb 28, 2023
Oh right, no wonder I had a hard time finding it via the git blame. Thanks for weighing in!
xu-baolin commentedon Mar 1, 2023
When scrolling from 1318.9 to 1337.0, the scroll metrics suddenly shrink, causing the wrong new position value to be calculated.
Maybe we should adjust the value in this case.
xu-baolin commentedon Mar 1, 2023
Just came out with a solution and will check whether it suits all the metrics change cases.
Piinks commentedon Mar 1, 2023
Thanks @xu-baolin!
[-]Defer painter updates during drag on scrollbar thumb[/-][+]Consider option to defer painter updates during drag on scrollbar thumb[/+]