diff options
author | 2023-04-17 13:55:40 -0700 | |
---|---|---|
committer | 2023-04-17 13:55:40 -0700 | |
commit | 6ad5e03d71db3dee174ac6512dceccc80e3a70a8 (patch) | |
tree | 3513d1f3f59c89ed1b4736756b2d26b9981afc84 /examples/scrollable | |
parent | b623f280ed43b04cef16a82de4cdf13497b5d63e (diff) | |
download | iced-6ad5e03d71db3dee174ac6512dceccc80e3a70a8.tar.gz iced-6ad5e03d71db3dee174ac6512dceccc80e3a70a8.tar.bz2 iced-6ad5e03d71db3dee174ac6512dceccc80e3a70a8.zip |
Add scrollable `Viewport`
Diffstat (limited to 'examples/scrollable')
-rw-r--r-- | examples/scrollable/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/scrollable/src/main.rs b/examples/scrollable/src/main.rs index be8d0f52..97344c94 100644 --- a/examples/scrollable/src/main.rs +++ b/examples/scrollable/src/main.rs @@ -36,7 +36,7 @@ enum Message { ScrollerWidthChanged(u16), ScrollToBeginning, ScrollToEnd, - Scrolled(scrollable::CurrentOffset), + Scrolled(scrollable::Viewport), } impl Application for ScrollableDemo { @@ -104,8 +104,8 @@ impl Application for ScrollableDemo { self.current_scroll_offset, ) } - Message::Scrolled(offset) => { - self.current_scroll_offset = offset.relative; + Message::Scrolled(viewport) => { + self.current_scroll_offset = viewport.relative_offset(); Command::none() } |