Reintroduce Scrollable::with_direction
This commit is contained in:
parent
10f367a313
commit
9be509d3b3
1 changed files with 9 additions and 1 deletions
|
|
@ -49,12 +49,20 @@ where
|
||||||
/// Creates a new vertical [`Scrollable`].
|
/// Creates a new vertical [`Scrollable`].
|
||||||
pub fn new(
|
pub fn new(
|
||||||
content: impl Into<Element<'a, Message, Theme, Renderer>>,
|
content: impl Into<Element<'a, Message, Theme, Renderer>>,
|
||||||
|
) -> Self {
|
||||||
|
Self::with_direction(content, Direction::default())
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Creates a new vertical [`Scrollable`].
|
||||||
|
pub fn with_direction(
|
||||||
|
content: impl Into<Element<'a, Message, Theme, Renderer>>,
|
||||||
|
direction: impl Into<Direction>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Scrollable {
|
Scrollable {
|
||||||
id: None,
|
id: None,
|
||||||
width: Length::Shrink,
|
width: Length::Shrink,
|
||||||
height: Length::Shrink,
|
height: Length::Shrink,
|
||||||
direction: Direction::default(),
|
direction: direction.into(),
|
||||||
content: content.into(),
|
content: content.into(),
|
||||||
on_scroll: None,
|
on_scroll: None,
|
||||||
class: Theme::default(),
|
class: Theme::default(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue