mirror of
https://github.com/rivo/tview.git
synced 2024-11-15 06:12:46 +00:00
This commit is contained in:
parent
f8bc69b903
commit
de7ae86b5b
10
flex.go
10
flex.go
@ -149,9 +149,13 @@ func (f *Flex) Draw(screen tcell.Screen) {
|
||||
for _, item := range f.items {
|
||||
size := item.FixedSize
|
||||
if size <= 0 {
|
||||
size = distSize * item.Proportion / proportionSum
|
||||
distSize -= size
|
||||
proportionSum -= item.Proportion
|
||||
if proportionSum > 0 {
|
||||
size = distSize * item.Proportion / proportionSum
|
||||
distSize -= size
|
||||
proportionSum -= item.Proportion
|
||||
} else {
|
||||
size = 0
|
||||
}
|
||||
}
|
||||
if item.Item != nil {
|
||||
if f.direction == FlexColumn {
|
||||
|
Loading…
Reference in New Issue
Block a user