diff options
Diffstat (limited to 'group_darwin.go')
| -rw-r--r-- | group_darwin.go | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/group_darwin.go b/group_darwin.go index 23dd563..eb3055c 100644 --- a/group_darwin.go +++ b/group_darwin.go @@ -14,10 +14,6 @@ type group struct { child Control container *container - - margined bool - - chainresize func(x int, y int, width int, height int, d *sizing) } func newGroup(text string, control Control) Group { @@ -26,9 +22,8 @@ func newGroup(text string, control Control) Group { g.controlSingleObject = newControlSingleObject(C.newGroup(g.container.id)) g.child = control g.child.setParent(g.container.parent()) + g.container.resize = g.child.resize g.SetText(text) - g.chainresize = g.fresize - g.fresize = g.xresize return g } @@ -43,18 +38,11 @@ func (g *group) SetText(text string) { } func (g *group) Margined() bool { - return g.margined + return g.container.margined } func (g *group) SetMargined(margined bool) { - g.margined = margined + g.container.margined = margined } -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 - 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) - g.child.resize(int(a.x), int(a.y), int(a.width), int(a.height), d) -} +// no need to override resize; the child container handles that for us |
