1
0
Fork 0

[layout] Skip invisible children in FlowLayout

Skip hidden actors when computing the preferred size and when
allocating.
This commit is contained in:
Emmanuele Bassi 2009-10-07 11:39:18 +01:00 committed by Emmanuele Bassi
parent b1bae4d66a
commit 4ea57bc685

View file

@ -118,6 +118,9 @@ clutter_flow_layout_get_preferred_width (ClutterLayoutManager *manager,
ClutterActor *child = l->data;
gfloat child_min, child_natural;
if (!CLUTTER_ACTOR_IS_VISIBLE (child))
continue;
clutter_actor_get_preferred_width (child, for_height,
&child_min,
&child_natural);
@ -172,6 +175,9 @@ clutter_flow_layout_get_preferred_height (ClutterLayoutManager *manager,
ClutterActor *child = l->data;
gfloat child_min, child_natural;
if (!CLUTTER_ACTOR_IS_VISIBLE (child))
continue;
clutter_actor_get_preferred_height (child, for_width,
&child_min,
&child_natural);
@ -263,6 +269,9 @@ clutter_flow_layout_allocate (ClutterLayoutManager *manager,
gfloat item_width, item_height;
gfloat child_min, child_natural;
if (!CLUTTER_ACTOR_IS_VISIBLE (child))
continue;
if (line_items_count == items_per_line)
{
if (priv->orientation == CLUTTER_FLOW_HORIZONTAL)