Switched the GTK+ layout control from GtkLayout back to GtkFixed; the size-allocate thing overrides the size-request issue I had earlier that prompted the switch away.

This commit is contained in:
Pietro Gagliardi 2014-07-21 10:45:37 -04:00
parent 7d3504e25b
commit d319d9f4ac
1 changed files with 5 additions and 3 deletions

View File

@ -20,8 +20,9 @@ type window struct {
bin *C.GtkBin
window *C.GtkWindow
layoutw *C.GtkWidget
layoutc *C.GtkContainer
layout *C.GtkLayout
layout *C.GtkFixed
child Control
@ -34,14 +35,15 @@ func newWindow(title string, width int, height int) *window {
widget := C.gtk_window_new(C.GTK_WINDOW_TOPLEVEL)
ctitle := togstr(title)
defer freegstr(ctitle)
layoutw := C.gtk_layout_new(nil, nil)
layoutw := C.gtk_fixed_new()
w := &window{
widget: widget,
container: (*C.GtkContainer)(unsafe.Pointer(widget)),
bin: (*C.GtkBin)(unsafe.Pointer(widget)),
window: (*C.GtkWindow)(unsafe.Pointer(widget)),
layoutw: layoutw,
layoutc: (*C.GtkContainer)(unsafe.Pointer(layoutw)),
layout: (*C.GtkLayout)(unsafe.Pointer(layoutw)),
layout: (*C.GtkFixed)(unsafe.Pointer(layoutw)),
closing: newEvent(),
}
C.gtk_window_set_title(w.window, ctitle)