Add support for embedded scrollbars for scrollable

Co-authored-by: dtzxporter <dtzxporter@users.noreply.github.com>
This commit is contained in:
Héctor Ramón Jiménez 2024-07-11 07:58:33 +02:00
parent 3c55e07668
commit 8ae4e09db9
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
4 changed files with 325 additions and 212 deletions

View file

@ -200,21 +200,18 @@ where
class,
} = menu;
let list = Scrollable::with_direction(
List {
options,
hovered_option,
on_selected,
on_option_hovered,
font,
text_size,
text_line_height,
text_shaping,
padding,
class,
},
scrollable::Direction::default(),
);
let list = Scrollable::new(List {
options,
hovered_option,
on_selected,
on_option_hovered,
font,
text_size,
text_line_height,
text_shaping,
padding,
class,
});
state.tree.diff(&list as &dyn Widget<_, _, _>);