From bea4df1abf6f4df34016727a300e4826fc31cc05 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 28 Jul 2014 14:00:01 -0400 Subject: Began final simplification of size code. spaced is now a global variable; either all controls are given spacing now, or none will. beginResize() is a method on container again. Done on GTK+ and Mac OS X for now. I'm going to go ahead and implement this on Windows in a bit, regardless of whether that Stack Overflow question get answered or not, because ugggggggggh I just want to continue working on this project for fuck's sake! --- redo/containers_unix.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'redo/containers_unix.go') diff --git a/redo/containers_unix.go b/redo/containers_unix.go index 68dbf08..fbb63ee 100644 --- a/redo/containers_unix.go +++ b/redo/containers_unix.go @@ -40,7 +40,6 @@ func (t *tab) Append(name string, control Control) { t.layoutcs = append(t.layoutcs, (*C.GtkContainer)(unsafe.Pointer(layout))) t.layouts = append(t.layouts, (*C.GtkLayout)(unsafe.Pointer(layout))) c := new(container) - // don't set beginResize; this container's resize() will be a recursive call t.containers = append(t.containers, c) c.child = control c.child.setParent((*C.GtkContainer)(unsafe.Pointer(layout))) @@ -60,11 +59,7 @@ func (t *tab) Append(name string, control Control) { } func (t *tab) allocate(x int, y int, width int, height int, d *sizing) []*allocation { - // set up the recursive calls - for _, c := range t.containers { - c.d = d - } - // and prepare the tabbed control itself + // only prepared the tabbed control; its children will be reallocated when that one is resized return t.widgetbase.allocate(x, y, width, height, d) } -- cgit v1.2.3