Don't allocate size for invisible BinLayout children

This commit is contained in:
Alexander Larsson 2012-06-05 10:55:17 +02:00
parent c7c3d85225
commit 8ef55e4e98
2 changed files with 12 additions and 0 deletions

View File

@ -298,6 +298,12 @@ Relevant information for developers with existing Clutter applications
wanting to port to newer releases (see NEWS for general information on new wanting to port to newer releases (see NEWS for general information on new
features). features).
Release Notes for Clutter 1.12
-------------------------------------------------------------------------------
* ClutterBinLayout no longer requests size for children that are
not visible, which is how the other layout managers work.
Release Notes for Clutter 1.10 Release Notes for Clutter 1.10
------------------------------------------------------------------------------- -------------------------------------------------------------------------------

View File

@ -326,6 +326,9 @@ clutter_bin_layout_get_preferred_width (ClutterLayoutManager *manager,
{ {
gfloat minimum, natural; gfloat minimum, natural;
if (!CLUTTER_ACTOR_IS_VISIBLE (child))
continue;
clutter_actor_get_preferred_width (child, for_height, clutter_actor_get_preferred_width (child, for_height,
&minimum, &minimum,
&natural); &natural);
@ -360,6 +363,9 @@ clutter_bin_layout_get_preferred_height (ClutterLayoutManager *manager,
{ {
gfloat minimum, natural; gfloat minimum, natural;
if (!CLUTTER_ACTOR_IS_VISIBLE (child))
continue;
clutter_actor_get_preferred_height (child, for_width, clutter_actor_get_preferred_height (child, for_width,
&minimum, &minimum,
&natural); &natural);