summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-04-20 16:09:15 +0200
committerLibravatar GitHub <noreply@github.com>2023-04-20 16:09:15 +0200
commit4052ccf2b52acda99c6186e3494a582579ce62bb (patch)
tree353966fc0163ed8ec3e10957c12df6e285c2d485 /examples
parent2155d0af1f76b12cd05a1b8dba1afc1e5ecdefe5 (diff)
parent8a711408de26c53cf6b18045ea19c677e8edbd95 (diff)
downloadiced-4052ccf2b52acda99c6186e3494a582579ce62bb.tar.gz
iced-4052ccf2b52acda99c6186e3494a582579ce62bb.tar.bz2
iced-4052ccf2b52acda99c6186e3494a582579ce62bb.zip
Merge pull request #1796 from tarkah/feat/scrollable-scroll-to
Add `scroll_to` operation
Diffstat (limited to 'examples')
-rw-r--r--examples/scrollable/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/scrollable/src/main.rs b/examples/scrollable/src/main.rs
index 2e99b1ac..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::RelativeOffset),
+ 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;
+ Message::Scrolled(viewport) => {
+ self.current_scroll_offset = viewport.relative_offset();
Command::none()
}