[clutter] Don't allocate size for invisible BinLayout children



commit 8ef55e4e98c192d2d59e90fba8b2bffccdeae08c
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Jun 5 10:55:17 2012 +0200

    Don't allocate size for invisible BinLayout children

 README.in                    |    6 ++++++
 clutter/clutter-bin-layout.c |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/README.in b/README.in
index c98dd39..5d14057 100644
--- a/README.in
+++ b/README.in
@@ -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
 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
 -------------------------------------------------------------------------------
 
diff --git a/clutter/clutter-bin-layout.c b/clutter/clutter-bin-layout.c
index bf4ad3e..9e83301 100644
--- a/clutter/clutter-bin-layout.c
+++ b/clutter/clutter-bin-layout.c
@@ -326,6 +326,9 @@ clutter_bin_layout_get_preferred_width (ClutterLayoutManager *manager,
     {
       gfloat minimum, natural;
 
+      if (!CLUTTER_ACTOR_IS_VISIBLE (child))
+        continue;
+
       clutter_actor_get_preferred_width (child, for_height,
                                          &minimum,
                                          &natural);
@@ -360,6 +363,9 @@ clutter_bin_layout_get_preferred_height (ClutterLayoutManager *manager,
     {
       gfloat minimum, natural;
 
+      if (!CLUTTER_ACTOR_IS_VISIBLE (child))
+        continue;
+
       clutter_actor_get_preferred_height (child, for_width,
                                           &minimum,
                                           &natural);



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