forked from enlightenment/efl
Scroller: Improvement in _key_action_move() calculations.
Summary: If x coordinate is equal to 0, key action is no more effective as EINA_FALSE is returned. This is creating problem in looping. Looping will be done when x < 0, but as soon as x == 0, _key_action_move starts returning EINA_FALSE. Same thing applies to y coordinate and other extremities. @fix Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com> Test Plan: elementary_test -> Scroller -> Loop in X axis -> scroll left using left key(looping does not happen) Reviewers: raster, Hermet, cedric, singh.amitesh, SanghyeonLee Reviewed By: SanghyeonLee Subscribers: sachin.dev, SanghyeonLee, eagleeye Differential Revision: https://phab.enlightenment.org/D2778
This commit is contained in:
parent
8dbed27dcd
commit
d9c18d9814
|
@ -189,22 +189,22 @@ _key_action_move(Evas_Object *obj, const char *params)
|
|||
}
|
||||
if (!strcmp(dir, "left"))
|
||||
{
|
||||
if (x <= 0) return EINA_FALSE;
|
||||
if ((x <= 0) && (!sd->loop_h)) return EINA_FALSE;
|
||||
x -= step_x;
|
||||
}
|
||||
else if (!strcmp(dir, "right"))
|
||||
{
|
||||
if (x >= (max_x - v_w)) return EINA_FALSE;
|
||||
if ((x >= (max_x - v_w)) && (!sd->loop_h)) return EINA_FALSE;
|
||||
x += step_x;
|
||||
}
|
||||
else if (!strcmp(dir, "up"))
|
||||
{
|
||||
if (y == 0) return EINA_FALSE;
|
||||
if ((y <= 0) && (!sd->loop_v)) return EINA_FALSE;
|
||||
y -= step_y;
|
||||
}
|
||||
else if (!strcmp(dir, "down"))
|
||||
{
|
||||
if (y >= (max_y - v_h)) return EINA_FALSE;
|
||||
if ((y >= (max_y - v_h)) && (!sd->loop_v)) return EINA_FALSE;
|
||||
y += step_y;
|
||||
}
|
||||
else if (!strcmp(dir, "first"))
|
||||
|
|
Loading…
Reference in New Issue