diff --git a/widget/src/scrollable.rs b/widget/src/scrollable.rs index 420ae88e..a10ee771 100644 --- a/widget/src/scrollable.rs +++ b/widget/src/scrollable.rs @@ -332,6 +332,12 @@ impl Scrollbar { Self::default() } + /// Create a [`Scrollbar`] with zero width to allow a [`Scrollable`] to scroll without a visible + /// scroller. + pub fn hidden() -> Self { + Self::default().width(0).scroller_width(0) + } + /// Sets the scrollbar width of the [`Scrollbar`] . pub fn width(mut self, width: impl Into) -> Self { self.width = width.into().0.max(0.0);