Remove min width 1 from scrollbar & scroller

This commit is contained in:
Cory Forsstrom 2023-05-10 17:09:29 -07:00 committed by Héctor Ramón Jiménez
parent e31582e59e
commit 12a57fae5c
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -128,9 +128,8 @@ impl Properties {
}
/// Sets the scrollbar width of the [`Scrollable`] .
/// Silently enforces a minimum width of 1.
pub fn width(mut self, width: impl Into<Pixels>) -> Self {
self.width = width.into().0.max(1.0);
self.width = width.into().0.max(0.0);
self
}
@ -141,9 +140,8 @@ impl Properties {
}
/// Sets the scroller width of the [`Scrollable`] .
/// Silently enforces a minimum width of 1.
pub fn scroller_width(mut self, scroller_width: impl Into<Pixels>) -> Self {
self.scroller_width = scroller_width.into().0.max(1.0);
self.scroller_width = scroller_width.into().0.max(0.0);
self
}
}