From c5917de29c5452b4ff11441fe353fe46984caa4f Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 30 Jul 2014 20:38:01 -0400 Subject: Split out the default definitions of Control.allocate() into a single place. --- redo/control_unix.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'redo/control_unix.go') diff --git a/redo/control_unix.go b/redo/control_unix.go index 92baa1b..d0a4c18 100644 --- a/redo/control_unix.go +++ b/redo/control_unix.go @@ -35,16 +35,7 @@ func newControl(widget *C.GtkWidget) *controlbase { c.fcontainerHide = func() { C.gtk_widget_hide(c.widget) } - c.fallocate = func(x int, y int, width int, height int, d *sizing) []*allocation { - // TODO split into its own function - return []*allocation{&allocation{ - x: x, - y: y, - width: width, - height: height, - this: c, - }} - } + c.fallocate = baseallocate(c) c.fpreferredSize = func(d *sizing) (int, int) { // GTK+ 3 makes this easy: controls can tell us what their preferred size is! // ...actually, it tells us two things: the "minimum size" and the "natural size". -- cgit v1.2.3