From fdcd92696078277b6d48f577c3289da68f91b091 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Mon, 12 Dec 2016 18:17:30 +0900 Subject: [PATCH] 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 3df7b717c932adac481aa0ec527d4d5893b07bb8 --- src/bin/elementary/test_gfx_filters.c | 1 + src/lib/evas/canvas/evas_object_box.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 src/bin/elementary/test_gfx_filters.c diff --git a/src/bin/elementary/test_gfx_filters.c b/src/bin/elementary/test_gfx_filters.c new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/src/bin/elementary/test_gfx_filters.c @@ -0,0 +1 @@ + diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c index f9952cd270..81251c1441 100644 --- a/src/lib/evas/canvas/evas_object_box.c +++ b/src/lib/evas/canvas/evas_object_box.c @@ -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);