summaryrefslogtreecommitdiff
path: root/gtk/gtkdialog.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-06-09 20:40:45 -0400
committerMatthias Clasen <mclasen@redhat.com>2011-06-09 20:43:02 -0400
commit1743e18c8765ee6679f907802c7a9016afd52e31 (patch)
tree0585b43a11a8d58d4c4daca7cc88b4431ee06cb7 /gtk/gtkdialog.c
parent3d1407a01a1e772f8b042801bbbde95ae1e16f9a (diff)
downloadgtk+-1743e18c8765ee6679f907802c7a9016afd52e31.tar.gz
GtkDialog: avoid underallocations
GtkDialog changes its size depending on style properties. If we only do this in response to ::style-updated, it happens during the initial realization of the dialog and leads to the dialog 'growing' between when we determine the initial window size and when we allocate it that size. So, do this beforehand.
Diffstat (limited to 'gtk/gtkdialog.c')
-rw-r--r--gtk/gtkdialog.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index 6aae900303..931ac617fe 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -349,6 +349,7 @@ update_spacings (GtkDialog *dialog)
"action-area-border", &action_area_border,
NULL);
+
gtk_container_set_border_width (GTK_CONTAINER (priv->vbox),
content_area_border);
if (!_gtk_box_get_spacing_set (GTK_BOX (priv->vbox)))
@@ -397,6 +398,8 @@ gtk_dialog_init (GtkDialog *dialog)
gtk_window_set_type_hint (GTK_WINDOW (dialog),
GDK_WINDOW_TYPE_HINT_DIALOG);
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ON_PARENT);
+
+ update_spacings (dialog);
}
static GtkBuildableIface *parent_buildable_iface;