summaryrefslogtreecommitdiff
path: root/newctrl/tab_unix.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-10-18 12:47:19 -0400
committerPietro Gagliardi <[email protected]>2014-10-18 12:47:19 -0400
commitb1ac28cc938d2de25357328d9da910a84a2cc8cc (patch)
treed34d26f0022dd0e9d9c7179bd59b1c4dbe7b6942 /newctrl/tab_unix.go
parent0f6e65188af0c4b1d3e4dff17ceb96bbd8ebb271 (diff)
Fixed parenting weirdnesses.
Diffstat (limited to 'newctrl/tab_unix.go')
-rw-r--r--newctrl/tab_unix.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/newctrl/tab_unix.go b/newctrl/tab_unix.go
index 608e3a6..064f17f 100644
--- a/newctrl/tab_unix.go
+++ b/newctrl/tab_unix.go
@@ -18,6 +18,8 @@ type tab struct {
tabs []*container
children []Control
+
+ chainresize func(x int, y int, width int, height int, d *sizing)
}
func newTab() Tab {
@@ -27,7 +29,8 @@ func newTab() Tab {
container: (*C.GtkContainer)(unsafe.Pointer(widget)),
notebook: (*C.GtkNotebook)(unsafe.Pointer(widget)),
}
- t.fresize = t.resize
+ t.chainresize = t.fresize
+ t.fresize = t.xresize
// there are no scrolling arrows by default; add them in case there are too many tabs
C.gtk_notebook_set_scrollable(t.notebook, C.TRUE)
return t
@@ -48,10 +51,9 @@ func (t *tab) Append(name string, control Control) {
cname)
}
-func (t *tab) resize(x int, y int, width int, height int, d *sizing) {
+func (t *tab) 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
- t.controlSingleWidget.resize(x, y, width, height, d)
+ t.chainresize(x, y, width, height, d)
// now that the containers have the correct size, we can resize the children
for i, _ := range t.tabs {