Skip to content
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

Scrolling in ListBox with touch gestures is not working correctly #3429

Closed
dmrayt opened this issue Jan 10, 2020 · 4 comments · Fixed by #6656
Closed

Scrolling in ListBox with touch gestures is not working correctly #3429

dmrayt opened this issue Jan 10, 2020 · 4 comments · Fixed by #6656
Milestone

Comments

@dmrayt
Copy link

dmrayt commented Jan 10, 2020

While scrolling with touch gestures in a ListBox, the touched item doesn't follow the finger as it should.
This make it very hard to scroll with gestures.

@kekekeks
Copy link
Member

kekekeks commented Jan 10, 2020

ListBox is currently incapable of smooth scrolling when virtualization is enabled, it can only scroll items one-by-one and reacts to mouse wheel 'steps'.
For now our ScrollContentPresenter attempts to accumulate the scroll delta and somehow translate it into mouse wheel scroll steps.

Obviously that's an imperfect solution. There is currently work in progress to make our containers to use ItemsPresenter which will enable smooth scrolling for virtualized listboxes, we expect it to be available in the next release.

@kekekeks kekekeks added this to the 0.10 milestone Jan 10, 2020
@dmrayt
Copy link
Author

dmrayt commented Jan 10, 2020

The problem is the fixed value for ScrollContentPresenter.LogicalScrollItemSize. This should be the size of the item as noted in the source code comment, or at least it should be configurable.
I've tested it with a value of 13 and it's (in my case) much better.

I will wait for the ItemsPresenter.

@kekekeks kekekeks modified the milestones: 0.10, 0.11 Dec 11, 2020
@robloo
Copy link
Contributor

robloo commented Sep 15, 2021

Somewhat related, not sure if I should open a new issue: Using the mouse Scroll Wheel over the expanded-state ScrollBar doesn't scroll the ListBox. Using the Scroll Wheel on the ListBox itself works just fine.

@maxkatz6
Copy link
Member

@robloo it's better to create another issue. As I understand, scrollbar handles wheel event instead of listbox under it.

grokys added a commit that referenced this issue Sep 29, 2021
Try to improve scrolling with gestures on virtualized lists.

Instead of using a fixed item size, try to calculate an item size by dividing the control bounds by the logical viewport size.

Fixes #3429
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants