forked from enlightenment/efl
Elm entry-anchor: Don't show anchor if there's none.
It's currently kinda hackish, but this can't be nicely solved without some really needed (anyway) features in smart object callbacks. In the meanwhile it's nice and working. Thanks to WooHyun for the catch. SVN revision: 69324
This commit is contained in:
parent
b5f70c370a
commit
765d13ed99
|
@ -3868,7 +3868,22 @@ _entry_hover_anchor_clicked(void *data, Evas_Object *obj, void *event_info)
|
|||
|
||||
evas_object_smart_callback_call(data, SIG_ANCHOR_HOVER_OPENED, &ei);
|
||||
evas_object_smart_callback_add(wd->anchor_hover.hover, "clicked", _anchor_hover_clicked, data);
|
||||
evas_object_show(wd->anchor_hover.hover);
|
||||
|
||||
/* FIXME: Should just check if there's any callback registered to the smart
|
||||
* events instead.
|
||||
* This is used to determine if anyone cares about the hover or not. */
|
||||
if (!elm_object_part_content_get(wd->anchor_hover.hover, "middle") &&
|
||||
!elm_object_part_content_get(wd->anchor_hover.hover, "left") &&
|
||||
!elm_object_part_content_get(wd->anchor_hover.hover, "right") &&
|
||||
!elm_object_part_content_get(wd->anchor_hover.hover, "top") &&
|
||||
!elm_object_part_content_get(wd->anchor_hover.hover, "bottom"))
|
||||
{
|
||||
evas_object_del(wd->anchor_hover.hover);
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_object_show(wd->anchor_hover.hover);
|
||||
}
|
||||
}
|
||||
/* END - ANCHOR HOVER */
|
||||
|
||||
|
|
Loading…
Reference in New Issue