From 6ea393e9bb477e2fb6cb64b398ba051d24afb72a Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Sat, 7 Sep 2024 20:49:33 +0100 Subject: [PATCH] Improving border docs --- container/layouts.go | 7 +++++-- layout/borderlayout.go | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/container/layouts.go b/container/layouts.go index e6c53c69ea..1e8446317a 100644 --- a/container/layouts.go +++ b/container/layouts.go @@ -16,8 +16,11 @@ func NewAdaptiveGrid(rowcols int, objects ...fyne.CanvasObject) *fyne.Container } // NewBorder creates a new container with the specified objects and using the border layout. -// The top, bottom, left and right parameters specify the items that should be placed around edges, -// the remaining elements will be in the center. Nil can be used to an edge if it should not be filled. +// The top, bottom, left and right parameters specify the items that should be placed around edges. +// Nil can be used to an edge if it should not be filled. +// Passed objects not assigned to any edge (parameters 5 onwards) will be used to fill the space +// remaining in the middle. +// Parameters 6 onwards will be stacked over the middle content in the specified order as a Stack container. // // Since: 1.4 func NewBorder(top, bottom, left, right fyne.CanvasObject, objects ...fyne.CanvasObject) *fyne.Container { diff --git a/layout/borderlayout.go b/layout/borderlayout.go index 51c54c1037..2cc420c9dd 100644 --- a/layout/borderlayout.go +++ b/layout/borderlayout.go @@ -13,8 +13,8 @@ type borderLayout struct { } // NewBorderLayout creates a new BorderLayout instance with top, bottom, left -// and right objects set. All other items in the container will fill the centre -// space +// and right objects set. All other items in the container will fill the remaining space in the middle. +// Multiple extra items will be stacked in the specified order as a Stack container. func NewBorderLayout(top, bottom, left, right fyne.CanvasObject) fyne.Layout { return &borderLayout{top, bottom, left, right} }