summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2015-08-26 15:35:47 +0530
committerAmitesh Singh <amitesh.sh@samsung.com>2015-08-28 17:41:25 +0530
commit5c091504987b66eb2ee068cdc20d635a2c73950a (patch)
treead16aaf6928c644363b75f5f9dc0c07a8e4434de
parente06b2a7ef2439c66889efe6190b9f41dcc3f8dee (diff)
gengrid: fix item focus movement in case of horizontal mode
Steps to reproduce: 1. elementary -> gengrid focus 2. change mode to horizontal 3. set focus to one of item in 2nd column. 4. Press Left direction key issue: focus moves out of gengrid. @fix
-rw-r--r--src/lib/elm_gengrid.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index cca3a0ed6..5eca39e14 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -2493,14 +2493,16 @@ _elm_gengrid_item_edge_check(Elm_Object_Item *eo_it,
2493 { 2493 {
2494 row = cvh / sd->item_height; 2494 row = cvh / sd->item_height;
2495 if (row <= 0) row = 1; 2495 if (row <= 0) row = 1;
2496 if (tmp->position <= row) 2496 col = tmp->position / row;
2497 if (col == 0)
2497 return EINA_TRUE; 2498 return EINA_TRUE;
2498 } 2499 }
2499 else if (sd->item_width > 0) 2500 else if (sd->item_width > 0)
2500 { 2501 {
2501 col = cvw / sd->item_width; 2502 col = cvw / sd->item_width;
2502 if (col <= 0) col = 1; 2503 if (col <= 0) col = 1;
2503 if (tmp->position <= col) 2504 row = tmp->position / col;
2505 if (row == 0)
2504 return EINA_TRUE; 2506 return EINA_TRUE;
2505 } 2507 }
2506 } 2508 }