flow-layout: Use the natural size
authorBastian Winkler <buz@netbuz.org>
Thu, 3 Dec 2009 15:38:05 +0000 (15:38 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Thu, 3 Dec 2009 15:38:05 +0000 (15:38 +0000)
Fix a copy-and-paste thinko where the cell size was computed using the
minimum size instead of the natural size. For actors with a minimum size
of zero, like Textures, this implied always a zero allocation.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
clutter/clutter-flow-layout.c

index 611a46b..4e649e6 100644 (file)
@@ -554,7 +554,7 @@ clutter_flow_layout_allocate (ClutterLayoutManager   *manager,
               clutter_actor_get_preferred_width (child, item_height,
                                                  &child_min,
                                                  &child_natural);
-              item_width = MIN (item_width, child_min);
+              item_width = MIN (item_width, child_natural);
 
               clutter_actor_get_preferred_height (child, item_width,
                                                   &child_min,
@@ -593,7 +593,7 @@ clutter_flow_layout_allocate (ClutterLayoutManager   *manager,
               clutter_actor_get_preferred_width (child, item_height,
                                                  &child_min,
                                                  &child_natural);
-              item_width = MIN (item_width, child_min);
+              item_width = MIN (item_width, child_natural);
 
               clutter_actor_get_preferred_height (child, item_width,
                                                   &child_min,