forked from enlightenment/efl
elementary: on focus loss actually hide the entry and show label.
SVN revision: 74819
This commit is contained in:
parent
3148dd42af
commit
eefbaaba3d
|
@ -370,3 +370,4 @@
|
||||||
2012-08-03 Cedric Bail
|
2012-08-03 Cedric Bail
|
||||||
|
|
||||||
* Add smart callback "focus-in" and "focus-out".
|
* Add smart callback "focus-in" and "focus-out".
|
||||||
|
* On focus loss, Elm_Spinner hide entry and display label properly.
|
||||||
|
|
|
@ -20,6 +20,7 @@ Additions:
|
||||||
* Elm_Win_Trap and elm_win_trap_set() to allow e17 integration.
|
* Elm_Win_Trap and elm_win_trap_set() to allow e17 integration.
|
||||||
* elm_flip_go_to()
|
* elm_flip_go_to()
|
||||||
* Add smart callback "focus-in" and "focus-out" when an Elementary object gain or loose focus.
|
* Add smart callback "focus-in" and "focus-out" when an Elementary object gain or loose focus.
|
||||||
|
* On focus loss, Elm_Spinner properly hide Elm_Entry and display label properly.
|
||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
|
|
||||||
|
|
|
@ -465,6 +465,16 @@ _elm_spinner_smart_event(Evas_Object *obj,
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_on_focus_out(void *data,
|
||||||
|
Evas_Object *obj __UNUSED__,
|
||||||
|
void *event_info __UNUSED__)
|
||||||
|
{
|
||||||
|
Evas_Object *spinner = data;
|
||||||
|
|
||||||
|
_entry_value_apply(spinner);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_elm_spinner_smart_add(Evas_Object *obj)
|
_elm_spinner_smart_add(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
@ -502,6 +512,7 @@ _elm_spinner_smart_add(Evas_Object *obj)
|
||||||
|
|
||||||
priv->ent = elm_entry_add(obj);
|
priv->ent = elm_entry_add(obj);
|
||||||
elm_entry_single_line_set(priv->ent, EINA_TRUE);
|
elm_entry_single_line_set(priv->ent, EINA_TRUE);
|
||||||
|
evas_object_smart_callback_add(priv->ent, "focus-out", _on_focus_out, obj);
|
||||||
evas_object_smart_callback_add
|
evas_object_smart_callback_add
|
||||||
(priv->ent, "activated", _entry_activated_cb, obj);
|
(priv->ent, "activated", _entry_activated_cb, obj);
|
||||||
|
|
||||||
|
|
|
@ -135,6 +135,8 @@ struct _Elm_Spinner_Smart_Data
|
||||||
Ecore_Timer *delay, *spin;
|
Ecore_Timer *delay, *spin;
|
||||||
Eina_List *special_values;
|
Eina_List *special_values;
|
||||||
|
|
||||||
|
void (*entry_focus_hook)(void *data, Evas_Object *obj);
|
||||||
|
|
||||||
Eina_Bool entry_visible : 1;
|
Eina_Bool entry_visible : 1;
|
||||||
Eina_Bool dragging : 1;
|
Eina_Bool dragging : 1;
|
||||||
Eina_Bool editable : 1;
|
Eina_Bool editable : 1;
|
||||||
|
|
Loading…
Reference in New Issue