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.kang@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 <cedric@osg.samsung.com>
((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)
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)
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;
}
}