Add horizontal helper to scrollable
This commit is contained in:
parent
91f94f3b6e
commit
8cac532cd9
1 changed files with 5 additions and 0 deletions
|
|
@ -137,6 +137,11 @@ where
|
|||
self
|
||||
}
|
||||
|
||||
/// Makes the [`Scrollable`] scroll horizontally, with default [`Scrollbar`] settings.
|
||||
pub fn horizontal(self) -> Self {
|
||||
self.direction(Direction::Horizontal(Scrollbar::default()))
|
||||
}
|
||||
|
||||
/// Sets the [`Direction`] of the [`Scrollable`].
|
||||
pub fn direction(mut self, direction: impl Into<Direction>) -> Self {
|
||||
self.direction = direction.into();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue