forked from enlightenment/efl
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:
parent
946aa945b3
commit
fdcd926960
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -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))
|
if ((new_w != child_w) || (new_h != child_h))
|
||||||
evas_object_resize(child, new_w, new_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;
|
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;
|
off_y += (oh - new_h) * priv->align.v;
|
||||||
evas_object_move(child, ox + off_x, oy + off_y);
|
evas_object_move(child, ox + off_x, oy + off_y);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue