evas: Fix stacked box align

I added a way to respect the object's alignment when adding them
to a stacked box, but that alignment should only be used when the
box align is set to fill, otherwise both aligns would conflict.

See 3df7b717c9
This commit is contained in:
Jean-Philippe Andre 2016-12-12 18:17:30 +09:00
parent 946aa945b3
commit fdcd926960
2 changed files with 3 additions and 2 deletions

View File

@ -0,0 +1 @@

View File

@ -1633,9 +1633,9 @@ _evas_box_layout_stack(Eo *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Data *
if ((new_w != child_w) || (new_h != child_h))
evas_object_resize(child, new_w, new_h);
if (priv->align.h >= 0.0)
if ((align_x < 0) && (priv->align.h >= 0.0))
off_x += (ow - new_w) * priv->align.h;
if (priv->align.v >= 0.0)
if ((align_y < 0) && (priv->align.v >= 0.0))
off_y += (oh - new_h) * priv->align.v;
evas_object_move(child, ox + off_x, oy + off_y);