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

Support large scroll offsets #222

Open
dhardy opened this issue Jul 25, 2021 · 0 comments
Open

Support large scroll offsets #222

dhardy opened this issue Jul 25, 2021 · 0 comments
Labels
internal API Design of core feature

Comments

@dhardy
Copy link
Collaborator

dhardy commented Jul 25, 2021

Currently, scroll offsets are limited by the i32 type to 2^32, and since #221 further limited to approx 2^24 to allow precise representation via f32. For most things this is fine but for ListView (and MatrixView etc.) this may be limiting.

We should be able to fix this by placing widgets nearer the origin in these view widgets, thus ScrollComponent's offset would be replaced with scroll_offset (position used by scroll bar) and offset (used to adjust draw position and events and much more limited in range, possibly calculated as scroll_offset % (1<<20) or similar).

Additionally we could then use i64 or f64 for scroll_offset and in Scrollable and ScrollBar, allowing scrolling over much larger ranges.

@dhardy dhardy added the internal API Design of core feature label Feb 23, 2022
@dhardy dhardy mentioned this issue Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal API Design of core feature
Projects
None yet
Development

No branches or pull requests

1 participant