summaryrefslogtreecommitdiffstats
path: root/widget
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--widget/src/scrollable.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs
index 9ba8cdea..312aee29 100644
--- a/widget/src/scrollable.rs
+++ b/widget/src/scrollable.rs
@@ -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();