forked from enlightenment/efl
bugfix: evas_object_box should reset size_hint_min to zero when no child exists.
there are some early-return code that were leaving the size_hint as it was before, then if you removed every child it should go to 0x0 but couldn't. PLEASE BACKPORT THIS TO 1.7 BRANCH FOR ME :-( SVN revision: 79948
This commit is contained in:
parent
90e312173a
commit
8ecc925249
|
@ -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
|
||||
|
|
1
NEWS
1
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.
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
evas_object_size_hint_min_set(o, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
/* *per col* arrays */
|
||||
col_max_w = (int *)alloca(sizeof(int) * n_children);
|
||||
|
|
Loading…
Reference in New Issue