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

@ -174,7 +174,8 @@ impl Tour {
} else {
content
}))
.spacing(10);
.spacing(10)
.auto_scroll(true);
center_y(scrollable).padding(10).into()
}
@ -626,7 +627,7 @@ pub enum Layout {
impl Default for Tour {
fn default() -> Self {
Self {
screen: Screen::Welcome,
screen: Screen::Scrollable,
slider: 50,
layout: Layout::Row,
spacing: 20,