libui: add cairo bitmap code (preliminary). fix bug where putting a draw area directly in the window caused it to be tiny.

This commit is contained in:
StapleButter
2017-09-19 02:22:07 +02:00
parent 5979ab2eb2
commit 8d79355f2e
3 changed files with 43 additions and 35 deletions

View File

@ -260,11 +260,12 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar)
gtk_widget_set_halign(w->childHolderWidget, GTK_ALIGN_FILL);
gtk_widget_set_vexpand(w->childHolderWidget, TRUE);
gtk_widget_set_valign(w->childHolderWidget, GTK_ALIGN_FILL);
gtk_box_set_homogeneous(GTK_BOX(w->childHolderWidget), TRUE);
gtk_container_add(w->vboxContainer, w->childHolderWidget);
// show everything in the vbox, but not the GtkWindow itself
gtk_widget_show_all(w->vboxWidget);
printf("wbox %p\n", w->childHolderWidget);
// and connect our events
g_signal_connect(w->widget, "delete-event", G_CALLBACK(onClosing), w);
g_signal_connect(w->childHolderWidget, "size-allocate", G_CALLBACK(onSizeAllocate), w);