diff options
author | 2023-04-14 13:32:44 -0700 | |
---|---|---|
committer | 2023-04-14 13:32:44 -0700 | |
commit | b623f280ed43b04cef16a82de4cdf13497b5d63e (patch) | |
tree | 278327c128ecc8716f3ad2b69c857363c548119a /examples/scrollable | |
parent | 4b05f42fd6d18bf572b772dd60d6a4309ea5f343 (diff) | |
download | iced-b623f280ed43b04cef16a82de4cdf13497b5d63e.tar.gz iced-b623f280ed43b04cef16a82de4cdf13497b5d63e.tar.bz2 iced-b623f280ed43b04cef16a82de4cdf13497b5d63e.zip |
Add `scroll_to` operation for absolute scroll
Diffstat (limited to 'examples/scrollable')
-rw-r--r-- | examples/scrollable/src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/scrollable/src/main.rs b/examples/scrollable/src/main.rs index 2e99b1ac..be8d0f52 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::RelativeOffset), + Scrolled(scrollable::CurrentOffset), } impl Application for ScrollableDemo { @@ -105,7 +105,7 @@ impl Application for ScrollableDemo { ) } Message::Scrolled(offset) => { - self.current_scroll_offset = offset; + self.current_scroll_offset = offset.relative; Command::none() } |