Skip to content

Commit

Permalink
Improving border docs
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Sep 7, 2024
1 parent 35cb432 commit 6ea393e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions container/layouts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions layout/borderlayout.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
Expand Down

0 comments on commit 6ea393e

Please sign in to comment.