Add scroll_to operation for absolute scroll
This commit is contained in:
parent
4b05f42fd6
commit
b623f280ed
4 changed files with 90 additions and 23 deletions
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue