From c25dbea3257f95e69c9a3e48cd25bd49e0660ab0 Mon Sep 17 00:00:00 2001 From: Trevor Slocum Date: Sun, 4 Jul 2021 01:30:23 -0700 Subject: [PATCH] Fill empty space in Flex with invisible Box Resolves #64. --- flex.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/flex.go b/flex.go index 841511c..80a9c7c 100644 --- a/flex.go +++ b/flex.go @@ -97,15 +97,14 @@ func (f *Flex) SetFullScreen(fullScreen bool) { // primitive receives focus. If multiple items have the "focus" flag set to // true, the first one will receive focus. // -// You can provide a nil value for the primitive. This will fill the empty -// screen space with the default background color. To show content behind the -// space, add a Box with a transparent background instead. +// A nil value for the primitive represents empty space. func (f *Flex) AddItem(item Primitive, fixedSize, proportion int, focus bool) { f.Lock() defer f.Unlock() if item == nil { item = NewBox() + item.SetVisible(false) } f.items = append(f.items, &flexItem{Item: item, FixedSize: fixedSize, Proportion: proportion, Focus: focus})