Gengrid: Fixed _elm_gengrid_item_edge_check for ELM_FOCUS_LEFT and ELM_FOCUS_RIGHT...
authorefl <efl@efl.(none)>
Wed, 28 May 2014 09:21:10 +0000 (18:21 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 28 May 2014 09:21:11 +0000 (18:21 +0900)
Summary:
1|4         _elm_gengrid_item_edge_check for ELM_FOCUS_LEFT returns EINA_FALSE for item no. 3,
2|          which should return EINA_TRUE. Fixed this.
3|

1|4|7|      _elm_gengrid_item_edge_check for ELM_FOCUS_RIGHT returns EINA_FALSE for item no.5,
2|5|        which should return EINA_TRUE. Fixed this.
3|6|

Test Plan: elementary_test -to gengrid2

Reviewers: seoz, eagleeye, SanghyeonLee, raster

CC: seoz, raster
Differential Revision: https://phab.enlightenment.org/D846

legacy/elementary/src/lib/elm_gengrid.c

index 11b7254..37f8cd2 100644 (file)
@@ -1947,7 +1947,7 @@ _elm_gengrid_item_edge_check(Elm_Object_Item *it,
           {
              row = cvh / sd->item_height;
              if (row <= 0) row = 1;
-             if (tmp->position < row)
+             if (tmp->position <= row)
                return EINA_TRUE;
           }
         else if (sd->item_width > 0)
@@ -1974,13 +1974,13 @@ _elm_gengrid_item_edge_check(Elm_Object_Item *it,
              if (x == 0)
                {
                   if ((tmp->position <= (row * col)) &&
-                      (tmp->position >= (row *(col - 1))))
+                      (tmp->position > (row *(col - 1))))
                     return EINA_TRUE;
                }
              else
                {
                   if ((tmp->position <= ((col * row) + x)) &&
-                      (tmp->position >= (col * row)))
+                      (tmp->position > ((col-1) * row) + x))
                     return EINA_TRUE;
                }
           }