From 9be509d3b3301ee0b9b3379cd1e814fc3aa5e56d Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 30 Jul 2024 22:21:52 +0200 Subject: Reintroduce `Scrollable::with_direction` --- widget/src/scrollable.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs index 6dd593cb..9ba8c39b 100644 --- a/widget/src/scrollable.rs +++ b/widget/src/scrollable.rs @@ -49,12 +49,20 @@ where /// Creates a new vertical [`Scrollable`]. pub fn new( content: impl Into>, + ) -> Self { + Self::with_direction(content, Direction::default()) + } + + /// Creates a new vertical [`Scrollable`]. + pub fn with_direction( + content: impl Into>, + direction: impl Into, ) -> Self { Scrollable { id: None, width: Length::Shrink, height: Length::Shrink, - direction: Direction::default(), + direction: direction.into(), content: content.into(), on_scroll: None, class: Theme::default(), -- cgit