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:
Tomas Vik 2017-01-07 17:16:22 +11:00 committed by Garrett D'Amore
parent 01ac1e4067
commit 57a866e10c
1 changed files with 2 additions and 0 deletions

View File

@ -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
} }
} }