hoversel: item-loop should happen on UP/DOWN Key in case of vertical hoversel and...
authorAmitesh Singh <amitesh.sh@samsung.com>
Wed, 14 May 2014 12:50:31 +0000 (21:50 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Wed, 14 May 2014 12:50:31 +0000 (21:50 +0900)
Summary:
Earlier focus was moving to top item from bottom item on LEFT key and to bottom item on RIGHT Key
in case of vertical hoversel.
@fix

Test Plan: elementary_test -to "Hoversel Focus"

Reviewers: raster, seoz

Reviewed By: seoz

CC: seoz, chinmaya061
Differential Revision: https://phab.enlightenment.org/D858

src/lib/elc_hoversel.c

index b4fdc49..a0578df 100644 (file)
@@ -513,7 +513,8 @@ _key_action_move(Evas_Object *obj, const char *params)
 
    if (!strcmp(dir, "down"))
      {
-        if (item_focused_get(sd) == litem)
+        if ((!sd->horizontal) &&
+            (item_focused_get(sd) == litem))
           {
             elm_object_focus_set(VIEW(fitem), EINA_TRUE);
             return EINA_TRUE;
@@ -523,7 +524,8 @@ _key_action_move(Evas_Object *obj, const char *params)
      }
    else if (!strcmp(dir, "up"))
      {
-        if (item_focused_get(sd) == fitem)
+        if ((!sd->horizontal) &&
+            (item_focused_get(sd) == fitem))
           {
             elm_object_focus_set(VIEW(litem), EINA_TRUE);
             return EINA_TRUE;
@@ -533,7 +535,8 @@ _key_action_move(Evas_Object *obj, const char *params)
      }
    else if (!strcmp(dir, "left"))
      {
-        if (item_focused_get(sd) == fitem)
+        if (sd->horizontal &&
+            (item_focused_get(sd) == fitem))
           {
             elm_object_focus_set(VIEW(litem), EINA_TRUE);
             return EINA_TRUE;
@@ -543,7 +546,8 @@ _key_action_move(Evas_Object *obj, const char *params)
      }
    else if (!strcmp(dir, "right"))
      {
-        if (item_focused_get(sd) == litem)
+        if (sd->horizontal &&
+            (item_focused_get(sd) == litem))
           {
             elm_object_focus_set(VIEW(fitem), EINA_TRUE);
             return EINA_TRUE;