diff options
author | 2024-07-11 07:58:33 +0200 | |
---|---|---|
committer | 2024-07-11 08:00:58 +0200 | |
commit | 8ae4e09db9badb801669c15408bc76e8675f9cc8 (patch) | |
tree | fc8681143c647742c15b2bb15cb5c27ff023c9ea /widget/src/overlay | |
parent | 3c55e076688fd7453e5feb53fccf8139076af584 (diff) | |
download | iced-8ae4e09db9badb801669c15408bc76e8675f9cc8.tar.gz iced-8ae4e09db9badb801669c15408bc76e8675f9cc8.tar.bz2 iced-8ae4e09db9badb801669c15408bc76e8675f9cc8.zip |
Add support for embedded scrollbars for `scrollable`
Co-authored-by: dtzxporter <dtzxporter@users.noreply.github.com>
Diffstat (limited to 'widget/src/overlay')
-rw-r--r-- | widget/src/overlay/menu.rs | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/widget/src/overlay/menu.rs b/widget/src/overlay/menu.rs index 98efe305..a43c8e8b 100644 --- a/widget/src/overlay/menu.rs +++ b/widget/src/overlay/menu.rs @@ -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<_, _, _>); |