Implemented the Control parent/unparent redraw provisions on the GTK+ backend.
This commit is contained in:
parent
e9c6d96d2d
commit
3b5c9738fd
|
@ -34,6 +34,8 @@ func (w *widgetbase) unparent() {
|
||||||
// we unref this in parent() below
|
// we unref this in parent() below
|
||||||
w.floating = true
|
w.floating = true
|
||||||
C.gtk_container_remove(w.parentw.layoutc, w.widget)
|
C.gtk_container_remove(w.parentw.layoutc, w.widget)
|
||||||
|
// redraw since we changed controls (by queueing a resize; thanks xxx in irc.gimp.net/#gtk+)
|
||||||
|
C.gtk_widget_queue_resize(w.parentw.layoutw)
|
||||||
w.parentw = nil
|
w.parentw = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,6 +50,8 @@ func (w *widgetbase) parent(win *window) {
|
||||||
}
|
}
|
||||||
// make sure the new widget is shown
|
// make sure the new widget is shown
|
||||||
C.gtk_widget_show_all(w.widget)
|
C.gtk_widget_show_all(w.widget)
|
||||||
|
// redraw since we changed controls (see above)
|
||||||
|
C.gtk_widget_queue_resize(win.layoutw)
|
||||||
}
|
}
|
||||||
|
|
||||||
type button struct {
|
type button struct {
|
||||||
|
|
Loading…
Reference in New Issue