Browse Source

Switched flexItem slice to pointers.

pull/135/head
Oliver 1 year ago
parent
commit
1ee0c559cc
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      flex.go

+ 2
- 2
flex.go View File

@@ -28,7 +28,7 @@ type Flex struct {
28 28
 	*Box
29 29
 
30 30
 	// The items to be positioned.
31
-	items []flexItem
31
+	items []*flexItem
32 32
 
33 33
 	// FlexRow or FlexColumn.
34 34
 	direction int
@@ -86,7 +86,7 @@ func (f *Flex) SetFullScreen(fullScreen bool) *Flex {
86 86
 // You can provide a nil value for the primitive. This will still consume screen
87 87
 // space but nothing will be drawn.
88 88
 func (f *Flex) AddItem(item Primitive, fixedSize, proportion int, focus bool) *Flex {
89
-	f.items = append(f.items, flexItem{Item: item, FixedSize: fixedSize, Proportion: proportion, Focus: focus})
89
+	f.items = append(f.items, &flexItem{Item: item, FixedSize: fixedSize, Proportion: proportion, Focus: focus})
90 90
 	return f
91 91
 }
92 92
 

Loading…
Cancel
Save