forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
5f01e6924f
commit
af64a60466
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user