forked from enlightenment/efl
entry: update selection handlers' visibility when entry is hidden or shown
Summary: Selection handlers' visibility should be updated when entry is hidden or shown When entry has selection and hidden, the selection handlers should be hidden also. This fix T1175. @fix Reviewers: seoz, woohyun, raster Reviewed By: raster Maniphest Tasks: T1175 Differential Revision: https://phab.enlightenment.org/D877
This commit is contained in:
parent
fbd0c3d868
commit
283140a639
|
@ -384,10 +384,16 @@ _hide_selection_handler(Evas_Object *obj)
|
||||||
|
|
||||||
if (!sd->start_handler) return;
|
if (!sd->start_handler) return;
|
||||||
|
|
||||||
edje_object_signal_emit(sd->start_handler, "elm,handler,hide", "elm");
|
if (sd->start_handler_shown)
|
||||||
sd->start_handler_shown = EINA_FALSE;
|
{
|
||||||
edje_object_signal_emit(sd->end_handler, "elm,handler,hide", "elm");
|
edje_object_signal_emit(sd->start_handler, "elm,handler,hide", "elm");
|
||||||
sd->end_handler_shown = EINA_FALSE;
|
sd->start_handler_shown = EINA_FALSE;
|
||||||
|
}
|
||||||
|
if (sd->end_handler_shown)
|
||||||
|
{
|
||||||
|
edje_object_signal_emit(sd->end_handler, "elm,handler,hide", "elm");
|
||||||
|
sd->end_handler_shown = EINA_FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Rectangle *
|
static Eina_Rectangle *
|
||||||
|
@ -3562,6 +3568,25 @@ _elm_entry_evas_smart_resize(Eo *obj, Elm_Entry_Data *sd, Evas_Coord w, Evas_Coo
|
||||||
eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
|
eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
|
||||||
|
|
||||||
evas_object_resize(sd->hit_rect, w, h);
|
evas_object_resize(sd->hit_rect, w, h);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
EOLIAN static void
|
||||||
|
_elm_entry_evas_smart_show(Eo *obj, Elm_Entry_Data *sd)
|
||||||
|
{
|
||||||
|
eo_do_super(obj, MY_CLASS, evas_obj_smart_show());
|
||||||
|
|
||||||
|
if (sd->have_selection)
|
||||||
|
_update_selection_handler(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
EOLIAN static void
|
||||||
|
_elm_entry_evas_smart_hide(Eo *obj, Elm_Entry_Data *sd)
|
||||||
|
{
|
||||||
|
eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
|
||||||
|
|
||||||
|
if (sd->have_selection)
|
||||||
|
_hide_selection_handler(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
|
|
|
@ -1163,6 +1163,8 @@ class Elm_Entry (Elm_Layout, Elm_Interface_Scrollable, Evas_Clickable_Interface)
|
||||||
Evas_Smart::add;
|
Evas_Smart::add;
|
||||||
Evas_Smart::resize;
|
Evas_Smart::resize;
|
||||||
Evas_Smart::del;
|
Evas_Smart::del;
|
||||||
|
Evas_Smart::show;
|
||||||
|
Evas_Smart::hide;
|
||||||
Elm_Widget::activate;
|
Elm_Widget::activate;
|
||||||
Elm_Widget::focus_direction_manager_is;
|
Elm_Widget::focus_direction_manager_is;
|
||||||
Elm_Widget::theme_apply;
|
Elm_Widget::theme_apply;
|
||||||
|
|
Loading…
Reference in New Issue