From 57a866e10c1c6110fdd3f4c1a8ac6b32b93453c3 Mon Sep 17 00:00:00 2001 From: Tomas Vik Date: Sat, 7 Jan 2017 17:16:22 +1100 Subject: [PATCH] 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 --- views/boxlayout.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/views/boxlayout.go b/views/boxlayout.go index 5e8f7f2..2616e23 100644 --- a/views/boxlayout.go +++ b/views/boxlayout.go @@ -99,6 +99,7 @@ func (b *BoxLayout) hLayout() { cw += c.pad c.view.Resize(x, y, cw, h) + c.widget.Resize() x += xinc } } @@ -162,6 +163,7 @@ func (b *BoxLayout) vLayout() { yinc = ch + c.pad ch += c.pad c.view.Resize(x, y, w, ch) + c.widget.Resize() y += yinc } }