From b1ac28cc938d2de25357328d9da910a84a2cc8cc Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 18 Oct 2014 12:47:19 -0400 Subject: Fixed parenting weirdnesses. --- newctrl/group_unix.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'newctrl/group_unix.go') diff --git a/newctrl/group_unix.go b/newctrl/group_unix.go index dc6191b..681ec75 100644 --- a/newctrl/group_unix.go +++ b/newctrl/group_unix.go @@ -20,6 +20,8 @@ type group struct { container *container margined bool + + chainresize func(x int, y int, width int, height int, d *sizing) } func newGroup(text string, control Control) Group { @@ -54,7 +56,8 @@ func newGroup(text string, control Control) Group { g.child.setParent(g.container.parent()) g.container.setParent(&controlParent{g.gcontainer}) - g.fresize = g.resize + g.chainresize = g.fresize + g.fresize = g.xresize return g } @@ -77,10 +80,9 @@ func (g *group) SetMargined(margined bool) { g.margined = margined } -func (g *group) resize(x int, y int, width int, height int, d *sizing) { +func (g *group) xresize(x int, y int, width int, height int, d *sizing) { // first, chain up to change the GtkFrame and its child container - // TODO use a variable for this - g.controlSingleWidget.resize(x, y, width, height, d) + g.chainresize(x, y, width, height, d) // now that the container has the correct size, we can resize the child a := g.container.allocation(g.margined) -- cgit v1.2.3