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

Suggestion: scrollable::scroll_by operation #2436

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lufte
Copy link
Contributor

@lufte lufte commented May 10, 2024

This new operation scrolls an scrollable an absolute amount from their current position, in contrast to scroll_to that scrolls to an absolute position.

I'm not entirely convinced my implementation is good, I just hacked away until it worked. Suggestions welcome.

My use case for this is that I want to scroll a scrollable with the keyboard, using custom keys, and by custom amounts of pixels. The content bounds are required in case the new AbsoluteOffset needs to be applied on top of a RelativeOffset.

scroll_by allows scrolling an absolute offset that is applied to the current scrolling position.
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.

None yet

1 participant