diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2011-10-20 03:04:18 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2011-10-20 03:04:18 -0700 |
commit | 2d02ac402ac8086d946f8a815104b30142ec83e5 (patch) | |
tree | 696506c6593cea3fc8609fe5eb374f94fb0842e2 /gtk-gui.c | |
parent | 04f372f8aa5b4f9ba462e0e93b76f3dde6af00f1 (diff) | |
download | subsurface-2d02ac402ac8086d946f8a815104b30142ec83e5.tar.gz |
Keep window size for new notebook pages
We used to set a fixed size instead of just copying the size that the
existing notebook has - which didn't really feel right when resizing and
then ripping of a page.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r-- | gtk-gui.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -529,6 +529,7 @@ static GtkNotebook *create_new_notebook_window(GtkNotebook *source, { GtkWidget *win, *notebook, *vbox; notebook_data_t *nbdp; + GtkAllocation allocation; /* pick the right notebook page data and return if both are detached */ if (nbd[0].widget == NULL) @@ -556,7 +557,8 @@ static GtkNotebook *create_new_notebook_window(GtkNotebook *source, /* disallow drop events */ gtk_drag_dest_set(notebook, 0, NULL, 0, 0); gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 6); - gtk_widget_set_size_request(notebook, 450, 350); + gtk_widget_get_allocation(page, &allocation); + gtk_widget_set_size_request(notebook, allocation.width, allocation.height); gtk_widget_show_all(win); return GTK_NOTEBOOK(notebook); |