From e8049af23dbf4988ff24b75b90104295f61098a2 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 15 Feb 2024 02:08:22 +0100 Subject: Make `horizontal_space` and `vertical_space` fill by default --- widget/src/space.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'widget/src/space.rs') diff --git a/widget/src/space.rs b/widget/src/space.rs index aeec91f9..35bb30c4 100644 --- a/widget/src/space.rs +++ b/widget/src/space.rs @@ -39,6 +39,18 @@ impl Space { height: height.into(), } } + + /// Sets the width of the [`Space`]. + pub fn width(mut self, width: impl Into) -> Self { + self.width = width.into(); + self + } + + /// Sets the height of the [`Space`]. + pub fn height(mut self, height: impl Into) -> Self { + self.height = height.into(); + self + } } impl Widget for Space -- cgit