hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=82d549ab8aac2a7fd0dc175f059eb75fd955c891
commit 82d549ab8aac2a7fd0dc175f059eb75fd955c891 Author: Woochan Lee <[email protected]> Date: Mon Sep 14 20:53:34 2015 +0900 multibuttonentry: Fix box item append rtl when mirror enabled. Summary: MBE item append logic changed when mirrored set as true. The item appended from left side of internal box to right side, even mirrored set as true. @fix Test Plan: Precondition : elm_widget_mirrored_set as true. Run mbe sample in elementary_test. Add item. Reviewers: cedric, Hermet Reviewed By: Hermet Differential Revision: https://phab.enlightenment.org/D2975 --- src/lib/elc_multibuttonentry.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c index 91f00ad..98e1b53 100644 --- a/src/lib/elc_multibuttonentry.c +++ b/src/lib/elc_multibuttonentry.c @@ -1306,6 +1306,7 @@ _box_layout_cb(Evas_Object *o, const Eina_List *l, *l_next; Evas_Object *obj; double ax, ay; + Eina_Bool rtl; if (!_box_min_size_calculate(o, priv, &lineh, data)) return; @@ -1313,6 +1314,10 @@ _box_layout_cb(Evas_Object *o, evas_object_size_hint_min_get(o, &minw, &minh); evas_object_size_hint_align_get(o, &ax, &ay); + + rtl = elm_widget_mirrored_get(data); + if (rtl) ax = 1.0 - ax; + if (w < minw) { x = x + ((w - minw) * (1.0 - ax)); @@ -1342,6 +1347,7 @@ _box_layout_cb(Evas_Object *o, fw = fh = EINA_FALSE; if (ax == -1.0) {fw = 1; ax = 0.5; } if (ay == -1.0) {fh = 1; ay = 0.5; } + if (rtl) ax = 1.0 - ax; ww = mnw; if (wx) @@ -1366,7 +1372,8 @@ _box_layout_cb(Evas_Object *o, } evas_object_move(obj, - xx + (Evas_Coord)(((double)(ww - ow)) * ax), + ((!rtl) ? (xx) : (x + (w - (xx - x) - ww))) + + (Evas_Coord)(((double)(ww - ow)) * ax), yy + (Evas_Coord)(((double)(hh - oh)) * ay)); evas_object_resize(obj, ow, oh); --
