Skip to content

Commit

Permalink
Stacklayout does not need to be a reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Dec 29, 2023
1 parent 1af438e commit 92e0cbd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layout/stacklayout.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type stackLayout struct {
//
// Since: 2.4
func NewStackLayout() fyne.Layout {
return &stackLayout{}
return stackLayout{}
}

// NewMaxLayout creates a new MaxLayout instance
Expand All @@ -28,7 +28,7 @@ func NewMaxLayout() fyne.Layout {

// Layout is called to pack all child objects into a specified size.
// For StackLayout this sets all children to the full size passed.
func (m *stackLayout) Layout(objects []fyne.CanvasObject, size fyne.Size) {
func (m stackLayout) Layout(objects []fyne.CanvasObject, size fyne.Size) {
topLeft := fyne.NewPos(0, 0)
for _, child := range objects {
child.Resize(size)
Expand All @@ -38,7 +38,7 @@ func (m *stackLayout) Layout(objects []fyne.CanvasObject, size fyne.Size) {

// MinSize finds the smallest size that satisfies all the child objects.
// For StackLayout this is determined simply as the MinSize of the largest child.
func (m *stackLayout) MinSize(objects []fyne.CanvasObject) fyne.Size {
func (m stackLayout) MinSize(objects []fyne.CanvasObject) fyne.Size {
minSize := fyne.NewSize(0, 0)
for _, child := range objects {
if !child.Visible() {
Expand Down

0 comments on commit 92e0cbd

Please sign in to comment.