[gtk+] box gadget: Fix allocation without baseline



commit af64a60466bd0a8cdcd16d68731f3fc125a62dec
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Feb 7 15:08:56 2016 +0100

    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

 gtk/gtkboxgadget.c |   21 ---------------------
 1 files changed, 0 insertions(+), 21 deletions(-)
---
diff --git a/gtk/gtkboxgadget.c b/gtk/gtkboxgadget.c
index 1adbcb6..e16ddbd 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]