-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New container.New() and container.NewWithoutLayout() functions (#1637)
This adds container.New() and container.NewWithoutLayout() over fyne.NewContainer() and derivatives.
- Loading branch information
Showing
3 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Package container provides container widgets that are used to lay out and organise applications | ||
package container | ||
|
||
import ( | ||
"fyne.io/fyne" | ||
) | ||
|
||
// New returns a new Container instance holding the specified CanvasObjects which will be laid out according to the specified Layout. | ||
// | ||
// Since 2.0.0 | ||
func New(layout fyne.Layout, objects ...fyne.CanvasObject) *fyne.Container { | ||
return fyne.NewContainerWithLayout(layout, objects...) | ||
} | ||
|
||
// NewWithoutLayout returns a new Container instance holding the specified CanvasObjects that are manually arranged. | ||
// | ||
// Since 2.0.0 | ||
func NewWithoutLayout(objects ...fyne.CanvasObject) *fyne.Container { | ||
return fyne.NewContainerWithoutLayout(objects...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters