GTK: apply window client size to childHolderWidget. fixes sizing when a menubar is present.

This commit is contained in:
StapleButter 2017-09-19 17:38:43 +02:00
parent edd33187b6
commit defe46e37e
1 changed files with 3 additions and 0 deletions

View File

@ -262,6 +262,9 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar)
gtk_widget_set_valign(w->childHolderWidget, GTK_ALIGN_FILL); gtk_widget_set_valign(w->childHolderWidget, GTK_ALIGN_FILL);
gtk_box_set_homogeneous(GTK_BOX(w->childHolderWidget), TRUE); gtk_box_set_homogeneous(GTK_BOX(w->childHolderWidget), TRUE);
gtk_container_add(w->vboxContainer, w->childHolderWidget); gtk_container_add(w->vboxContainer, w->childHolderWidget);
// set client size proper
gtk_widget_set_size_request(w->childHolderWidget, width, height);
// show everything in the vbox, but not the GtkWindow itself // show everything in the vbox, but not the GtkWindow itself
gtk_widget_show_all(w->vboxWidget); gtk_widget_show_all(w->vboxWidget);