From: Amitesh Singh Date: Wed, 23 Oct 2013 07:42:04 +0000 (+0900) Subject: [slider] - show popup on left/right/up/down key down press and hide popup on ... X-Git-Tag: upstream/1.20.0~7116^2~14^2~3912 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=329eb907f1dffbd2ddefb568dbfa6f3698ab858f;p=platform%2Fupstream%2Fefl.git [slider] - show popup on left/right/up/down key down press and hide popup on left/right/up/down key up press. Test Plan: elementary_test->slider Reviewers: seoz, Hermet Differential Revision: https://phab.enlightenment.org/D275 --- diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog index e85f251..e403324 100644 --- a/legacy/elementary/ChangeLog +++ b/legacy/elementary/ChangeLog @@ -1715,3 +1715,7 @@ 2013-10-21 Ryuan Choi (ryuan) * fileselector : Monitor and update changes of selected path automatically while EIO is working. + +2013-10-22 Amitesh Singh (_ami_) + + * slider : Show popup on left/right/up/down key down press and hide on left/right/up/down key up press. diff --git a/legacy/elementary/NEWS b/legacy/elementary/NEWS index 67fd840..d56d0e0 100644 --- a/legacy/elementary/NEWS +++ b/legacy/elementary/NEWS @@ -102,6 +102,7 @@ Additions: Improvements: + * Slider : Show popup on left/right/up/down key down press and hide on left/right/up/down key up press. * Default theme is now dark (matching Enlightenment). * Toolbar widget is now a scrollable widget. * Entry widget is now a scrollable layout. diff --git a/legacy/elementary/src/lib/elm_slider.c b/legacy/elementary/src/lib/elm_slider.c old mode 100644 new mode 100755 index 859a0ba..79b09dd --- a/legacy/elementary/src/lib/elm_slider.c +++ b/legacy/elementary/src/lib/elm_slider.c @@ -370,6 +370,23 @@ _elm_slider_smart_event(Eo *obj, void *_pd, va_list *list) if (elm_widget_disabled_get(obj)) return; if (type == EVAS_CALLBACK_KEY_DOWN) goto key_down; + else if (type == EVAS_CALLBACK_KEY_UP) + { + Evas_Event_Key_Up *ev_up = event_info; + + if ((!ev_up->string) && + ((!strcmp(ev_up->key, "Left")) || + (!strcmp(ev_up->key, "KP_Left")) || + (!strcmp(ev_up->key, "Right")) || + (!strcmp(ev_up->key, "KP_Right")) || + (!strcmp(ev_up->key, "Up")) || + (!strcmp(ev_up->key, "KP_Up")) || + (!strcmp(ev_up->key, "Down")) || + (!strcmp(ev_up->key, "KP_Down")))) + _popup_hide(obj, NULL, NULL, NULL); + + return; + } else if (type != EVAS_CALLBACK_MOUSE_WHEEL) return; @@ -425,6 +442,7 @@ key_down: else return; success: + _popup_show(obj, NULL, NULL, NULL); _slider_update(obj, EINA_TRUE); if (ret) *ret = EINA_TRUE;