summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWoochan Lee <wc0917.lee@samsung.com>2015-09-14 20:53:34 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-09-14 20:53:34 +0900
commit82d549ab8aac2a7fd0dc175f059eb75fd955c891 (patch)
treee38c136ee6b70e3903ffa2b6468764e497a2dd3a
parentddeb728e0fd5dd47b85680d5f6fc693250bedec1 (diff)
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
-rw-r--r--src/lib/elc_multibuttonentry.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c
index 91f00ad2b..98e1b5332 100644
--- a/src/lib/elc_multibuttonentry.c
+++ b/src/lib/elc_multibuttonentry.c
@@ -1306,6 +1306,7 @@ _box_layout_cb(Evas_Object *o,
1306 const Eina_List *l, *l_next; 1306 const Eina_List *l, *l_next;
1307 Evas_Object *obj; 1307 Evas_Object *obj;
1308 double ax, ay; 1308 double ax, ay;
1309 Eina_Bool rtl;
1309 1310
1310 if (!_box_min_size_calculate(o, priv, &lineh, data)) return; 1311 if (!_box_min_size_calculate(o, priv, &lineh, data)) return;
1311 1312
@@ -1313,6 +1314,10 @@ _box_layout_cb(Evas_Object *o,
1313 1314
1314 evas_object_size_hint_min_get(o, &minw, &minh); 1315 evas_object_size_hint_min_get(o, &minw, &minh);
1315 evas_object_size_hint_align_get(o, &ax, &ay); 1316 evas_object_size_hint_align_get(o, &ax, &ay);
1317
1318 rtl = elm_widget_mirrored_get(data);
1319 if (rtl) ax = 1.0 - ax;
1320
1316 if (w < minw) 1321 if (w < minw)
1317 { 1322 {
1318 x = x + ((w - minw) * (1.0 - ax)); 1323 x = x + ((w - minw) * (1.0 - ax));
@@ -1342,6 +1347,7 @@ _box_layout_cb(Evas_Object *o,
1342 fw = fh = EINA_FALSE; 1347 fw = fh = EINA_FALSE;
1343 if (ax == -1.0) {fw = 1; ax = 0.5; } 1348 if (ax == -1.0) {fw = 1; ax = 0.5; }
1344 if (ay == -1.0) {fh = 1; ay = 0.5; } 1349 if (ay == -1.0) {fh = 1; ay = 0.5; }
1350 if (rtl) ax = 1.0 - ax;
1345 1351
1346 ww = mnw; 1352 ww = mnw;
1347 if (wx) 1353 if (wx)
@@ -1366,7 +1372,8 @@ _box_layout_cb(Evas_Object *o,
1366 } 1372 }
1367 1373
1368 evas_object_move(obj, 1374 evas_object_move(obj,
1369 xx + (Evas_Coord)(((double)(ww - ow)) * ax), 1375 ((!rtl) ? (xx) : (x + (w - (xx - x) - ww)))
1376 + (Evas_Coord)(((double)(ww - ow)) * ax),
1370 yy + (Evas_Coord)(((double)(hh - oh)) * ay)); 1377 yy + (Evas_Coord)(((double)(hh - oh)) * ay));
1371 evas_object_resize(obj, ow, oh); 1378 evas_object_resize(obj, ow, oh);
1372 1379