diff options
author | Matthias Clasen <mclasen@redhat.com> | 2016-02-07 15:08:56 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2016-02-07 15:08:56 +0100 |
commit | af64a60466bd0a8cdcd16d68731f3fc125a62dec (patch) | |
tree | a8788333fc595beeac1d2b40cbf37da1292a0d8d /gtk/gtkboxgadget.c | |
parent | 5f01e6924f9abb56bade811cef21f0e436371b1e (diff) | |
download | gtk+-af64a60466bd0a8cdcd16d68731f3fc125a62dec.tar.gz |
box gadget: Fix allocation without baseline
When we don't get a baseline passed in, we want to basically
center the children inside the allocation. There was an attempt
in the code to do 'internal baseline alignment', but it had the
side effect of moving the contents to the top when we don't get
a baseline passed in. Remove it for now, this needs some more
infrastructure to do properly.
https://bugzilla.gnome.org/show_bug.cgi?id=761363
Diffstat (limited to 'gtk/gtkboxgadget.c')
-rw-r--r-- | gtk/gtkboxgadget.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/gtk/gtkboxgadget.c b/gtk/gtkboxgadget.c index 1adbcb6774..e16ddbd2ff 100644 --- a/gtk/gtkboxgadget.c +++ b/gtk/gtkboxgadget.c @@ -387,27 +387,6 @@ gtk_box_gadget_allocate (GtkCssGadget *gadget, { gtk_box_gadget_distribute (GTK_BOX_GADGET (gadget), allocation->height, allocation->width, sizes); - if (baseline < 0) - { - for (i = 0; i < priv->children->len; i++) - { - GtkBoxGadgetChild *child = &g_array_index (priv->children, GtkBoxGadgetChild, i); - - if (gtk_box_gadget_child_get_align (GTK_BOX_GADGET (gadget), child) == GTK_ALIGN_BASELINE) - { - gint child_min, child_nat; - gint child_baseline_min, child_baseline_nat; - - gtk_box_gadget_measure_child (child->object, - GTK_ORIENTATION_VERTICAL, - sizes[i].minimum_size, - &child_min, &child_nat, - &child_baseline_min, &child_baseline_nat); - baseline = MAX (baseline, child_baseline_min); - } - } - } - for (i = 0; i < priv->children->len; i++) { GtkBoxGadgetChild *child = &g_array_index (priv->children, GtkBoxGadgetChild, i); |