From 8a6d4f699cb7f2c647cb3fff7733bc39bbf19904 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 19 May 2020 10:05:27 +0200 Subject: [PATCH] layout: expand Stack documentation Signed-off-by: Elias Naur --- layout/stack.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/layout/stack.go b/layout/stack.go index 1b0af623..ffde6f85 100644 --- a/layout/stack.go +++ b/layout/stack.go @@ -26,16 +26,17 @@ type StackChild struct { dims Dimensions } -// Stacked returns a Stack child that laid out with the same maximum -// constraints as the Stack. +// Stacked returns a Stack child that is laid out with no minimum +// constraints and the maximum constraints passed to Stack.Layout. func Stacked(w Widget) StackChild { return StackChild{ widget: w, } } -// Expanded returns a Stack child that is forced to take up at least -// the space as the largest Stacked. +// Expanded returns a Stack child with the minimum constraints set +// to the largest Stacked child. The maximum constraints are set to +// the same as passed to Stack.Layout. func Expanded(w Widget) StackChild { return StackChild{ expanded: true,