Make horizontal_space and vertical_space fill by default

This commit is contained in:
Héctor Ramón Jiménez 2024-02-15 02:08:22 +01:00
parent 9dd20ead08
commit e8049af23d
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
16 changed files with 54 additions and 46 deletions

View file

@ -39,6 +39,18 @@ impl Space {
height: height.into(),
}
}
/// Sets the width of the [`Space`].
pub fn width(mut self, width: impl Into<Length>) -> Self {
self.width = width.into();
self
}
/// Sets the height of the [`Space`].
pub fn height(mut self, height: impl Into<Length>) -> Self {
self.height = height.into();
self
}
}
impl<Message, Theme, Renderer> Widget<Message, Theme, Renderer> for Space