Add auto_scroll method to scrollable widget

This commit is contained in:
Héctor Ramón Jiménez 2025-11-28 06:08:20 +01:00
parent 71e57fe889
commit 519e7ae414
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
4 changed files with 29 additions and 9 deletions

View file

@ -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 {