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

scrollable::scroll_by operation #2436

Merged
merged 1 commit into from
Sep 10, 2024
Merged

scrollable::scroll_by operation #2436

merged 1 commit into from
Sep 10, 2024

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.

@hecrj hecrj added this to the 0.13 milestone Sep 10, 2024
@hecrj hecrj added feature New feature or request widget addition labels Sep 10, 2024
`scroll_by` allows scrolling an absolute offset
that is applied to the current scrolling position.
@hecrj hecrj changed the title Suggestion: scrollable::scroll_by operation scrollable::scroll_by operation Sep 10, 2024
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hecrj hecrj merged commit c22559c into iced-rs:master Sep 10, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition feature New feature or request widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants