iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm
https://iced.rs
MIT License
22.96k stars 1.06k forks source link

Don't consume unused scroll events #2397

Closed Koranir closed 3 weeks ago

Koranir commented 3 weeks ago

If the viewport of a scrollable is not changed by an event, it did not consume it. This updates the code to reflect that.

(This means that scrollables can be nested and scroll the parent scrollable if an end is reached, and that horizontal scrollables can be put in vertical ones with no issue)

This is not mutually exclusive with #2381, but that would need some sort of heuristic to determine whether a scroll was active recently.