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/helpers.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'widget/src/helpers.rs') diff --git a/widget/src/helpers.rs b/widget/src/helpers.rs index e9898d67..400fced5 100644 --- a/widget/src/helpers.rs +++ b/widget/src/helpers.rs @@ -305,15 +305,15 @@ where /// Creates a new horizontal [`Space`] with the given [`Length`]. /// /// [`Space`]: crate::Space -pub fn horizontal_space(width: impl Into) -> Space { - Space::with_width(width) +pub fn horizontal_space() -> Space { + Space::with_width(Length::Fill) } /// Creates a new vertical [`Space`] with the given [`Length`]. /// /// [`Space`]: crate::Space -pub fn vertical_space(height: impl Into) -> Space { - Space::with_height(height) +pub fn vertical_space() -> Space { + Space::with_height(Length::Fill) } /// Creates a horizontal [`Rule`] with the given height. -- cgit