From 92e0cbdce18b13bc15ea69d9ce283af871347bdd Mon Sep 17 00:00:00 2001 From: Jacob Date: Fri, 29 Dec 2023 23:54:41 +0100 Subject: [PATCH] Stacklayout does not need to be a reference --- layout/stacklayout.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layout/stacklayout.go b/layout/stacklayout.go index 81e09a535b..7874fbde15 100644 --- a/layout/stacklayout.go +++ b/layout/stacklayout.go @@ -16,7 +16,7 @@ type stackLayout struct { // // Since: 2.4 func NewStackLayout() fyne.Layout { - return &stackLayout{} + return stackLayout{} } // NewMaxLayout creates a new MaxLayout instance @@ -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) @@ -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() {