diff options
author | 2025-02-01 04:26:35 +0100 | |
---|---|---|
committer | 2025-02-01 04:26:35 +0100 | |
commit | 8cac532cd9355a96c010a1c693f266fadd511680 (patch) | |
tree | 933fded9a3b91e8e3ce30c31f0d9c93bb8ddec87 /widget/src/scrollable.rs | |
parent | 91f94f3b6e62bf05fb82b3c3bd999eff7b3fd339 (diff) | |
download | iced-8cac532cd9355a96c010a1c693f266fadd511680.tar.gz iced-8cac532cd9355a96c010a1c693f266fadd511680.tar.bz2 iced-8cac532cd9355a96c010a1c693f266fadd511680.zip |
Add `horizontal` helper to `scrollable`
Diffstat (limited to '')
-rw-r--r-- | widget/src/scrollable.rs | 5 |
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(); |