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

Notify scrollable::Viewport changes #2438

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

Koranir
Copy link
Contributor

@Koranir Koranir commented May 11, 2024

Fixes #2437.
Closes #2490.

Due to some inherent limitations, the operation can't access the on_scroll function, and so it sets a flag to be consumed on a later event. A better solution might be to give operations access to a Shell, so a message could be triggered manually, but that might not be necessary in this case.

@lufte
Copy link
Contributor

lufte commented May 11, 2024

@Koranir I'm gonna thank you on my behalf because this is good enough for me. Really clever.

I've applied to my fork :)

@hecrj hecrj changed the title Queue on_scroll to be run on operation Notify scrollable::Viewport changes Sep 10, 2024
@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
Co-authored-by: Daniel Yoon <101683475+Koranir@users.noreply.github.com>
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!

I have changed the approach to simply notify any Viewport change on RedrawRequested.

This should also supsersede #2490.

@hecrj hecrj merged commit 7bffab7 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.

on_scroll is not fired when scrolling via operations
3 participants