summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangHyeon Lee <sh10233.lee@samsung.com>2017-01-25 13:11:08 +0900
committerSangHyeon Lee <sh10233.lee@samsung.com>2017-01-25 13:13:20 +0900
commitbec54fc870e813ac5d091d34e2374ba01861a877 (patch)
tree3d677383fee00a5ed96b0438377a3830b7eea132
parent7a5e64ef90e097b18d34d4337d04d7929e29b6aa (diff)
gengrid : fix mirrored position calculate to apply pan width instead of object width
the pan object width can be different with object width, because of padding and bar area, so we should using pan's width instead of object width for mirrored calculation. in elementary_test gengrid sample, you can see, when mirrored on, the alignment is broken before merge this patch. Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
-rw-r--r--src/lib/elementary/elm_gengrid.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index 4e129a71b0..651e3a74cf 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -1675,7 +1675,7 @@ _item_place(Elm_Gen_Item *it,
1675 Evas_Coord cx, 1675 Evas_Coord cx,
1676 Evas_Coord cy) 1676 Evas_Coord cy)
1677{ 1677{
1678 Evas_Coord x, y, ox, oy, cvx, cvy, cvw, cvh, iw, ih, ww; 1678 Evas_Coord x, y, ox, oy, cvx, cvy, cvw, cvh, iw, ih;
1679 Evas_Coord tch, tcw, alignw = 0, alignh = 0, vw, vh; 1679 Evas_Coord tch, tcw, alignw = 0, alignh = 0, vw, vh;
1680 Eina_Bool reorder_item_move_forward = EINA_FALSE; 1680 Eina_Bool reorder_item_move_forward = EINA_FALSE;
1681 Eina_Bool was_realized, can_resize; 1681 Eina_Bool was_realized, can_resize;
@@ -1852,11 +1852,10 @@ _item_place(Elm_Gen_Item *it,
1852 * pan_x when in RTL 1852 * pan_x when in RTL
1853 * mode */ 1853 * mode */
1854 { 1854 {
1855 evas_object_geometry_get(WIDGET(it), NULL, NULL, &ww, NULL);
1856 if (wsd->horizontal && can_resize) 1855 if (wsd->horizontal && can_resize)
1857 x = ww - x - it->item->w - wsd->pan_x - wsd->pan_x + ox + ox; 1856 x = vw - x - it->item->w - wsd->pan_x - wsd->pan_x + ox + ox;
1858 else 1857 else
1859 x = ww - x - wsd->item_width - wsd->pan_x - wsd->pan_x + ox + ox; 1858 x = vw - x - wsd->item_width - wsd->pan_x - wsd->pan_x + ox + ox;
1860 } 1859 }
1861 iw = (wsd->horizontal && can_resize) ? it->item->w : wsd->item_width; 1860 iw = (wsd->horizontal && can_resize) ? it->item->w : wsd->item_width;
1862 ih = (!wsd->horizontal && can_resize) ? it->item->h : wsd->item_height; 1861 ih = (!wsd->horizontal && can_resize) ? it->item->h : wsd->item_height;