gengrid: fix mirrored position calculate to apply pan width instead of object width 46/111946/1
authorSangHyeon Lee <sh10233.lee@samsung.com>
Wed, 25 Jan 2017 05:33:38 +0000 (14:33 +0900)
committerSangHyeon Lee <sh10233.lee@samsung.com>
Wed, 25 Jan 2017 05:34:54 +0000 (21:34 -0800)
This is port of upstream patch
bec54fc870e813ac5d091d34e2374ba01861a877

Change-Id: Ic9979a9c79facf3545047dd6d0f88c91da930336
Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
src/lib/elm_gengrid.c

index 9d76dafc66654ecb92b4ecbb3375b8cf9daa7c17..d4af13d1dd9a7db9ef66a4d2bb5c2732b04c2d53 100644 (file)
@@ -1763,7 +1763,7 @@ _item_place(Elm_Gen_Item *it,
             Evas_Coord cx,
             Evas_Coord cy)
 {
-   Evas_Coord x, y, ox, oy, cvx, cvy, cvw, cvh, iw, ih, ww;
+   Evas_Coord x, y, ox, oy, cvx, cvy, cvw, cvh, iw, ih;
    Evas_Coord tch, tcw, alignw = 0, alignh = 0, vw, vh;
    Eina_Bool reorder_item_move_forward = EINA_FALSE;
    Eina_Bool was_realized, can_resize;
@@ -1941,11 +1941,10 @@ _item_place(Elm_Gen_Item *it,
                                                   * pan_x when in RTL
                                                   * mode */
           {
-             evas_object_geometry_get(WIDGET(it), NULL, NULL, &ww, NULL);
              if (wsd->horizontal && can_resize)
-               x = ww - x - it->item->w - wsd->pan_x - wsd->pan_x + ox + ox;
+               x = vw - x - it->item->w - wsd->pan_x - wsd->pan_x + ox + ox;
              else
-               x = ww - x - wsd->item_width - wsd->pan_x - wsd->pan_x + ox + ox;
+               x = vw - x - wsd->item_width - wsd->pan_x - wsd->pan_x + ox + ox;
           }
         iw = (wsd->horizontal && can_resize) ? it->item->w : wsd->item_width;
         ih = (!wsd->horizontal && can_resize) ? it->item->h : wsd->item_height;