diff --git a/ChangeLog b/ChangeLog index d006b7d3e0..e3b698ac9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-11-30 Gustavo Sverzut Barbieri (k-s) + + * Fix evas_object_box.c to properly reset size_hint_min to zero if + there are no objects packed into the box. + 2012-11-22 Paulo Alcantara (pcacjr) * Add scalecache support to Cserve2 diff --git a/NEWS b/NEWS index 292adefad0..b76af1d1b3 100644 --- a/NEWS +++ b/NEWS @@ -28,3 +28,4 @@ Fixes: * Fixed glGetIntegerv() in Direct Rendering mode for Evas GL to properly handle GL_SCISSOR_BOX and GL_VIEWPORT parameters. * Fixed textblock textprop leak. + * Fixed evas_object_box to reset size_hint_min to zero when no child. diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c index e8c694f271..16d6275b67 100644 --- a/src/lib/evas/canvas/evas_object_box.c +++ b/src/lib/evas/canvas/evas_object_box.c @@ -745,11 +745,17 @@ _box_layout_horizontal(Eo *o, void *_pd, va_list *list EINA_UNUSED) n_children = eina_list_count(priv->children); if (!n_children) - return; + { + evas_object_size_hint_min_set(o, 0, 0); + return; + } objects = (Evas_Object_Box_Option **)alloca(sizeof(Evas_Object_Box_Option *) * n_children); if (!objects) - return; + { + evas_object_size_hint_min_set(o, 0, 0); + return; + } evas_object_geometry_get(o, &x, &y, &w, &h); global_pad = priv->pad.h; @@ -911,11 +917,17 @@ _box_layout_vertical(Eo *o, void *_pd, va_list *list EINA_UNUSED) n_children = eina_list_count(priv->children); if (!n_children) - return; + { + evas_object_size_hint_min_set(o, 0, 0); + return; + } objects = (Evas_Object_Box_Option **)alloca(sizeof(Evas_Object_Box_Option *) * n_children); if (!objects) - return; + { + evas_object_size_hint_min_set(o, 0, 0); + return; + } evas_object_geometry_get(o, &x, &y, &w, &h); global_pad = priv->pad.v; @@ -1021,7 +1033,10 @@ _box_layout_homogeneous_horizontal(Eo *o, void *_pd, va_list *list EINA_UNUSED) n_children = eina_list_count(priv->children); if (!n_children) - return; + { + evas_object_size_hint_min_set(o, 0, 0); + return; + } evas_object_geometry_get(o, &x, &y, &w, &h); @@ -1090,7 +1105,10 @@ _box_layout_homogeneous_vertical(Eo *o, void *_pd, va_list *list EINA_UNUSED) n_children = eina_list_count(priv->children); if (!n_children) - return; + { + evas_object_size_hint_min_set(o, 0, 0); + return; + } evas_object_geometry_get(o, &x, &y, &w, &h); @@ -1159,7 +1177,10 @@ _box_layout_homogeneous_max_size_horizontal(Eo *o, void *_pd, va_list *list EINA n_children = eina_list_count(priv->children); if (!n_children) - return; + { + evas_object_size_hint_min_set(o, 0, 0); + return; + } evas_object_geometry_get(o, &x, &y, &w, &h); @@ -1251,7 +1272,10 @@ _box_layout_homogeneous_max_size_vertical(Eo *o, void *_pd, va_list *list EINA_U n_children = eina_list_count(priv->children); if (!n_children) - return; + { + evas_object_size_hint_min_set(o, 0, 0); + return; + } evas_object_geometry_get(o, &x, &y, &w, &h); @@ -1411,7 +1435,10 @@ _box_layout_flow_horizontal(Eo *o, void *_pd, va_list *list EINA_UNUSED) n_children = eina_list_count(priv->children); if (!n_children) - return; + { + evas_object_size_hint_min_set(o, 0, 0); + return; + } /* *per row* arrays */ row_max_h = (int *)alloca(sizeof(int) * n_children); @@ -1593,7 +1620,10 @@ _box_layout_flow_vertical(Eo *o, void *_pd, va_list *list EINA_UNUSED) n_children = eina_list_count(priv->children); if (!n_children) - return; + { + evas_object_size_hint_min_set(o, 0, 0); + return; + } /* *per col* arrays */ col_max_w = (int *)alloca(sizeof(int) * n_children);