Skip to content

scrollable::scroll_by operation#2436

Merged
hecrj merged 1 commit into
iced-rs:masterfrom
lufte:scrollby
Sep 10, 2024
Merged

scrollable::scroll_by operation#2436
hecrj merged 1 commit into
iced-rs:masterfrom
lufte:scrollby

Conversation

@lufte

@lufte lufte commented May 10, 2024

Copy link
Copy Markdown
Contributor

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

@hecrj hecrj left a comment

Copy link
Copy Markdown
Member

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
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