ClutterActor *actor, *child;
gint i;
DimensionData *columns;
+ ClutterOrientation orientation = CLUTTER_ORIENTATION_HORIZONTAL;
update_row_col (self, container);
g_array_set_size (priv->columns, 0);
col->pref_size = MAX (col->pref_size, c_pref);
if (!col->expand)
- col->expand = meta->x_expand;
+ {
+ col->expand = clutter_actor_needs_expand (child, orientation) ||
+ meta->x_expand;
+ }
}
/* STAGE TWO: take spanning children into account */
}
if (!columns[i].expand)
- columns[i].expand = meta->x_expand;
+ {
+ columns[i].expand = clutter_actor_needs_expand (child,
+ orientation) ||
+ meta->x_expand;
+ }
}
min_width += priv->col_spacing * (meta->col_span - 1);
pref_width += priv->col_spacing * (meta->col_span - 1);
ClutterActor *actor, *child;
gint i;
DimensionData *rows, *columns;
+ ClutterOrientation orientation = CLUTTER_ORIENTATION_VERTICAL;
update_row_col (self, container);
g_array_set_size (priv->rows, 0);
row->pref_size = MAX (row->pref_size, c_pref);
if (!row->expand)
- row->expand = meta->y_expand;
+ {
+ row->expand = clutter_actor_needs_expand (child, orientation) ||
+ meta->y_expand;
+ }
}
/* STAGE TWO: take spanning children into account */
}
if (!rows[i].expand)
- rows[i].expand = meta->y_expand;
+ {
+ rows[i].expand = clutter_actor_needs_expand (child,
+ orientation) ||
+ meta->y_expand;
+ }
}
min_height += priv->row_spacing * (meta->row_span - 1);
clutter_actor_set_easing_delay (child, easing_delay);
}
- clutter_actor_allocate_align_fill (child, &childbox,
- x_align, y_align,
- x_fill, y_fill,
- flags);
+ if (clutter_actor_needs_expand (child, CLUTTER_ORIENTATION_HORIZONTAL) ||
+ clutter_actor_needs_expand (child, CLUTTER_ORIENTATION_VERTICAL))
+ clutter_actor_allocate (child, &childbox, flags);
+ else
+ clutter_actor_allocate_align_fill (child, &childbox,
+ x_align, y_align,
+ x_fill, y_fill,
+ flags);
if (use_animations)
clutter_actor_restore_easing_state (child);