mirror of https://github.com/gdamore/tcell.git
Adding Widget Resize to BoxLayout function
- Widget might be using not just View but other mechanisms for rendering aware of the view size (e.g. ViewPort). - By updating the view reference out of Widget, Widget doesn't have a chance to react on this layout algorithm - That's an existing bug that happens when we try to use CellView inside of an BoxLayout
This commit is contained in:
parent
01ac1e4067
commit
57a866e10c
|
@ -99,6 +99,7 @@ func (b *BoxLayout) hLayout() {
|
||||||
cw += c.pad
|
cw += c.pad
|
||||||
|
|
||||||
c.view.Resize(x, y, cw, h)
|
c.view.Resize(x, y, cw, h)
|
||||||
|
c.widget.Resize()
|
||||||
x += xinc
|
x += xinc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -162,6 +163,7 @@ func (b *BoxLayout) vLayout() {
|
||||||
yinc = ch + c.pad
|
yinc = ch + c.pad
|
||||||
ch += c.pad
|
ch += c.pad
|
||||||
c.view.Resize(x, y, w, ch)
|
c.view.Resize(x, y, w, ch)
|
||||||
|
c.widget.Resize()
|
||||||
y += yinc
|
y += yinc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue