Add auto_scroll method to scrollable widget
This commit is contained in:
parent
71e57fe889
commit
519e7ae414
4 changed files with 29 additions and 9 deletions
|
|
@ -210,7 +210,8 @@ impl ScrollableDemo {
|
|||
.width(Fill)
|
||||
.height(Fill)
|
||||
.id(SCROLLABLE)
|
||||
.on_scroll(Message::Scrolled),
|
||||
.on_scroll(Message::Scrolled)
|
||||
.auto_scroll(true),
|
||||
Direction::Horizontal => scrollable(
|
||||
row![
|
||||
scroll_to_end_button(),
|
||||
|
|
@ -236,7 +237,8 @@ impl ScrollableDemo {
|
|||
.width(Fill)
|
||||
.height(Fill)
|
||||
.id(SCROLLABLE)
|
||||
.on_scroll(Message::Scrolled),
|
||||
.on_scroll(Message::Scrolled)
|
||||
.auto_scroll(true),
|
||||
Direction::Multi => scrollable(
|
||||
//horizontal content
|
||||
row![
|
||||
|
|
@ -283,7 +285,8 @@ impl ScrollableDemo {
|
|||
.width(Fill)
|
||||
.height(Fill)
|
||||
.id(SCROLLABLE)
|
||||
.on_scroll(Message::Scrolled),
|
||||
.on_scroll(Message::Scrolled)
|
||||
.auto_scroll(true),
|
||||
});
|
||||
|
||||
let progress_bars: Element<Message> = match self.scrollable_direction {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue