cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a83643d134c7352de33acd75586347450f6e7eca
commit a83643d134c7352de33acd75586347450f6e7eca Author: Minkyu Kang <mk7.k...@samsung.com> Date: Tue Oct 25 14:12:42 2016 -0700 elementary: gengrid - check the edge correctly Summary: The routine of checking edge of left side, divide position by row. Since the result of fisrt item of last line is 1, that item was not checked as edge. This patch is for fixing it. Signed-off-by: Minkyu Kang <mk7.k...@samsung.com> Test Plan: elementary_test -to gengrid2 append items (about 6) horizontal mode on and item loop enable check item loop is working properly Reviewers: cedric, jpeg, Hermet, SanghyeonLee Subscribers: jehun.lim, SanghyeonLee, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4358 Signed-off-by: Cedric Bail <ced...@osg.samsung.com> --- src/lib/elementary/elm_gengrid.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 717b306..768d6b2 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -2771,6 +2771,7 @@ _elm_gengrid_item_edge_check(Elm_Object_Item *eo_it, ((sd->horizontal) && (dir == ELM_FOCUS_LEFT))) { Evas_Coord col, row, cvw, cvh; + int x; evas_object_geometry_get(sd->pan_obj, NULL, NULL, &cvw, &cvh); if (sd->horizontal && sd->item_height > 0) @@ -2778,7 +2779,8 @@ _elm_gengrid_item_edge_check(Elm_Object_Item *eo_it, row = cvh / sd->item_height; if (row <= 0) row = 1; col = tmp->position / row; - if (col == 0) + x = tmp->position % row; + if (col == 0 || (col == 1 && x == 0)) return EINA_TRUE; } else if (sd->item_width > 0) @@ -2786,7 +2788,8 @@ _elm_gengrid_item_edge_check(Elm_Object_Item *eo_it, col = cvw / sd->item_width; if (col <= 0) col = 1; row = tmp->position / col; - if (row == 0) + x = tmp->position % col; + if (row == 0 || (row == 1 && x == 0)) return EINA_TRUE; } } --