forked from enlightenment/efl
elm_spinner.c: fixed spinner arrow key bug.
Consider the spinner direction for the arrow key events.
This commit is contained in:
parent
d12ad3fbf1
commit
1a3660fd8e
|
@ -1616,3 +1616,7 @@
|
||||||
|
|
||||||
* elm_object_item : Introduces new APIs, elm_object_item_track(),
|
* elm_object_item : Introduces new APIs, elm_object_item_track(),
|
||||||
elm_object_item_untrack(), elm_object_item_track_get().
|
elm_object_item_untrack(), elm_object_item_track_get().
|
||||||
|
|
||||||
|
2013-09-14 Daniel Juyung Seo (SeoZ)
|
||||||
|
|
||||||
|
* spinner : fixed arrow key focus movement bug.
|
||||||
|
|
|
@ -281,6 +281,7 @@ Fixes:
|
||||||
* Flip : Fix the flip page to not flip on a direction if the direction is disabled.
|
* Flip : Fix the flip page to not flip on a direction if the direction is disabled.
|
||||||
* Spinner : change part name to access.text from access_text on default style.
|
* Spinner : change part name to access.text from access_text on default style.
|
||||||
* Fix fileselector only send "selected" signal without selection when file path is typed on the path entry.
|
* Fix fileselector only send "selected" signal without selection when file path is typed on the path entry.
|
||||||
|
* Fix spinner arrow key focus movement bug.
|
||||||
|
|
||||||
Removals:
|
Removals:
|
||||||
|
|
||||||
|
|
|
@ -436,6 +436,7 @@ _elm_spinner_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
void *event_info = va_arg(*list, void *);
|
void *event_info = va_arg(*list, void *);
|
||||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||||
if (ret) *ret = EINA_FALSE;
|
if (ret) *ret = EINA_FALSE;
|
||||||
|
Eina_Bool horz = !!strcmp(elm_widget_style_get(obj), "vertical");
|
||||||
|
|
||||||
if (elm_widget_disabled_get(obj)) return;
|
if (elm_widget_disabled_get(obj)) return;
|
||||||
if (type == EVAS_CALLBACK_KEY_DOWN)
|
if (type == EVAS_CALLBACK_KEY_DOWN)
|
||||||
|
@ -443,10 +444,15 @@ _elm_spinner_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
Evas_Event_Key_Down *ev = event_info;
|
Evas_Event_Key_Down *ev = event_info;
|
||||||
|
|
||||||
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
|
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
|
||||||
else if (!strcmp(ev->key, "Left") ||
|
else if (
|
||||||
((!strcmp(ev->key, "KP_Left")) && (!ev->string)) ||
|
( (!strcmp(ev->key, "Left") ||
|
||||||
!strcmp(ev->key, "Down") ||
|
((!strcmp(ev->key, "KP_Left")) && (!ev->string)))
|
||||||
((!strcmp(ev->key, "KP_Down")) && (!ev->string)))
|
&& horz )
|
||||||
|
||
|
||||||
|
( (!strcmp(ev->key, "Down") ||
|
||||||
|
((!strcmp(ev->key, "KP_Down")) && (!ev->string)))
|
||||||
|
&& !horz )
|
||||||
|
)
|
||||||
{
|
{
|
||||||
_val_dec_start(obj);
|
_val_dec_start(obj);
|
||||||
elm_layout_signal_emit(obj, "elm,left,anim,activate", "elm");
|
elm_layout_signal_emit(obj, "elm,left,anim,activate", "elm");
|
||||||
|
@ -454,10 +460,15 @@ _elm_spinner_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
|
||||||
if (ret) *ret = EINA_TRUE;
|
if (ret) *ret = EINA_TRUE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (!strcmp(ev->key, "Right") ||
|
else if (
|
||||||
((!strcmp(ev->key, "KP_Right")) && (!ev->string)) ||
|
( (!strcmp(ev->key, "Right") ||
|
||||||
!strcmp(ev->key, "Up") ||
|
((!strcmp(ev->key, "KP_Right")) && (!ev->string)))
|
||||||
((!strcmp(ev->key, "KP_Up")) && (!ev->string)))
|
&& horz )
|
||||||
|
||
|
||||||
|
( (!strcmp(ev->key, "Up") ||
|
||||||
|
((!strcmp(ev->key, "KP_Up")) && (!ev->string)))
|
||||||
|
&& !horz )
|
||||||
|
)
|
||||||
{
|
{
|
||||||
_val_inc_start(obj);
|
_val_inc_start(obj);
|
||||||
elm_layout_signal_emit(obj, "elm,right,anim,activate", "elm");
|
elm_layout_signal_emit(obj, "elm,right,anim,activate", "elm");
|
||||||
|
|
Loading…
Reference in New Issue