Add scrollable Viewport
This commit is contained in:
parent
b623f280ed
commit
6ad5e03d71
4 changed files with 61 additions and 52 deletions
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue