From 8346209c3706002573f990d5b7ab6b645d0b13a6 Mon Sep 17 00:00:00 2001 From: Jonathan Li <30177086+MonliH@users.noreply.github.com> Date: Thu, 1 Oct 2020 17:10:13 -0400 Subject: [PATCH 1/3] Satify documented behaviour --- native/src/widget/column.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/src/widget/column.rs b/native/src/widget/column.rs index 42cfe9b9..17fa7fd6 100644 --- a/native/src/widget/column.rs +++ b/native/src/widget/column.rs @@ -42,7 +42,7 @@ impl<'a, Message, Renderer> Column<'a, Message, Renderer> { Column { spacing: 0, padding: 0, - width: Length::Shrink, + width: Length::Fill, height: Length::Shrink, max_width: u32::MAX, max_height: u32::MAX, From 7c242772108b5be6812443a021af37127686e52e Mon Sep 17 00:00:00 2001 From: Jonathan Li <30177086+MonliH@users.noreply.github.com> Date: Fri, 2 Oct 2020 21:53:40 -0400 Subject: [PATCH 2/3] Document better --- native/src/widget/column.rs | 5 +++-- native/src/widget/row.rs | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/native/src/widget/column.rs b/native/src/widget/column.rs index 17fa7fd6..a003c584 100644 --- a/native/src/widget/column.rs +++ b/native/src/widget/column.rs @@ -10,9 +10,10 @@ use std::u32; /// A container that distributes its contents vertically. /// -/// A [`Column`] will try to fill the horizontal space of its container. +/// A [`Column`] will not fill the horizontal space of its container. (set to [`Length::shrink`] by defualt) /// /// [`Column`]: struct.Column.html +/// [`Length::shrink`]: ../../enum.Length.html #[allow(missing_debug_implementations)] pub struct Column<'a, Message, Renderer> { spacing: u16, @@ -42,7 +43,7 @@ impl<'a, Message, Renderer> Column<'a, Message, Renderer> { Column { spacing: 0, padding: 0, - width: Length::Fill, + width: Length::Shrink, height: Length::Shrink, max_width: u32::MAX, max_height: u32::MAX, diff --git a/native/src/widget/row.rs b/native/src/widget/row.rs index 2b6db224..dd85a543 100644 --- a/native/src/widget/row.rs +++ b/native/src/widget/row.rs @@ -10,9 +10,10 @@ use std::u32; /// A container that distributes its contents horizontally. /// -/// A [`Row`] will try to fill the horizontal space of its container. +/// A [`Row`] will not fill the horizontal space of its container. (set to [`Length::shrink`] by defualt) /// /// [`Row`]: struct.Row.html +/// [`Length::shrink`]: ../../enum.Length.html #[allow(missing_debug_implementations)] pub struct Row<'a, Message, Renderer> { spacing: u16, From 461499dd62fdacd3dcbe9ffec5c069b3468d4238 Mon Sep 17 00:00:00 2001 From: Jonathan Li <30177086+MonliH@users.noreply.github.com> Date: Sat, 17 Oct 2020 10:48:31 -0400 Subject: [PATCH 3/3] Remove entirely --- native/src/widget/column.rs | 5 ----- native/src/widget/row.rs | 5 ----- 2 files changed, 10 deletions(-) diff --git a/native/src/widget/column.rs b/native/src/widget/column.rs index a003c584..4fd6e065 100644 --- a/native/src/widget/column.rs +++ b/native/src/widget/column.rs @@ -9,11 +9,6 @@ use crate::{ use std::u32; /// A container that distributes its contents vertically. -/// -/// A [`Column`] will not fill the horizontal space of its container. (set to [`Length::shrink`] by defualt) -/// -/// [`Column`]: struct.Column.html -/// [`Length::shrink`]: ../../enum.Length.html #[allow(missing_debug_implementations)] pub struct Column<'a, Message, Renderer> { spacing: u16, diff --git a/native/src/widget/row.rs b/native/src/widget/row.rs index dd85a543..846940c6 100644 --- a/native/src/widget/row.rs +++ b/native/src/widget/row.rs @@ -9,11 +9,6 @@ use crate::{ use std::u32; /// A container that distributes its contents horizontally. -/// -/// A [`Row`] will not fill the horizontal space of its container. (set to [`Length::shrink`] by defualt) -/// -/// [`Row`]: struct.Row.html -/// [`Length::shrink`]: ../../enum.Length.html #[allow(missing_debug_implementations)] pub struct Row<'a, Message, Renderer> { spacing: u16,