mirror of https://github.com/rivo/tview.git
Switched flexItem slice to pointers.
This commit is contained in:
parent
0ebcb1ed99
commit
1ee0c559cc
4
flex.go
4
flex.go
|
@ -28,7 +28,7 @@ type Flex struct {
|
|||
*Box
|
||||
|
||||
// The items to be positioned.
|
||||
items []flexItem
|
||||
items []*flexItem
|
||||
|
||||
// FlexRow or FlexColumn.
|
||||
direction int
|
||||
|
@ -86,7 +86,7 @@ func (f *Flex) SetFullScreen(fullScreen bool) *Flex {
|
|||
// You can provide a nil value for the primitive. This will still consume screen
|
||||
// space but nothing will be drawn.
|
||||
func (f *Flex) AddItem(item Primitive, fixedSize, proportion int, focus bool) *Flex {
|
||||
f.items = append(f.items, flexItem{Item: item, FixedSize: fixedSize, Proportion: proportion, Focus: focus})
|
||||
f.items = append(f.items, &flexItem{Item: item, FixedSize: fixedSize, Proportion: proportion, Focus: focus})
|
||||
return f
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue