summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgodly.talias <godly.talias@samsung.com>2016-05-30 14:39:36 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-05-30 14:39:37 +0900
commitafb4a194a82a092cb1568924c36d9b186007a28e (patch)
tree578b44d6866df5f2b631883ca42b144bef0a3ae0
parent610b766db258495e5bcf32343cc643c12708446d (diff)
Added feature to bring focused item to viewport on click
Summary: Currently when an item in gengrid is focused and if it is scrolled off the viewport halfly and if it user clicks on it, it won't be scrolled into viewport. Only non-focused items will be scrolled into viewport when clicked. Test Plan: elementary_test -> Gengrid focus -> Click an item -> Scroll it little bit out of viewport -> Click again Reviewers: prince.dubey, shilpasingh, cedric, raster, SanghyeonLee Subscribers: seoz, rajeshps, govi, jpeg Differential Revision: https://phab.enlightenment.org/D3977
-rw-r--r--src/lib/elementary/elm_gengrid.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index be9888a89b..0f73473b52 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -1108,6 +1108,22 @@ _item_mouse_up_cb(void *data,
1108 1108
1109 if ((ev->flags == EVAS_BUTTON_NONE) && (sd->focused_item != eo_it)) 1109 if ((ev->flags == EVAS_BUTTON_NONE) && (sd->focused_item != eo_it))
1110 elm_object_item_focus_set(eo_it, EINA_TRUE); 1110 elm_object_item_focus_set(eo_it, EINA_TRUE);
1111 else if (ev->flags == EVAS_BUTTON_NONE)
1112 {
1113 switch (_elm_config->focus_autoscroll_mode)
1114 {
1115 case ELM_FOCUS_AUTOSCROLL_MODE_SHOW:
1116 elm_gengrid_item_show
1117 (eo_it, ELM_GENGRID_ITEM_SCROLLTO_IN);
1118 break;
1119 case ELM_FOCUS_AUTOSCROLL_MODE_BRING_IN:
1120 elm_gengrid_item_bring_in
1121 (eo_it, ELM_GENGRID_ITEM_SCROLLTO_IN);
1122 break;
1123 default:
1124 break;
1125 }
1126 }
1111 1127
1112 if (sd->multi && 1128 if (sd->multi &&
1113 ((sd->multi_select_mode != ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL) || 1129 ((sd->multi_select_mode != ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL) ||