elementary: Balance menu operations with an open method

This commit is contained in:
Andy Williams 2017-06-17 18:00:34 +01:00
parent 53065309b8
commit 81d01cfbd0
3 changed files with 13 additions and 1 deletions

View File

@ -211,7 +211,7 @@ _open_bt_clicked(void *data, Evas_Object *obj EINA_UNUSED,
Evas_Object *mn = data;
if (!mn) return;
evas_object_show(mn);
elm_menu_open(mn);
}
static void

View File

@ -986,6 +986,12 @@ _elm_menu_move(Eo *obj, Elm_Menu_Data *sd, Evas_Coord x, Evas_Coord y)
_sizing_eval(obj);
}
EOLIAN static void
_elm_menu_open(Eo *obj, Elm_Menu_Data *sd)
{
evas_object_show(obj);
}
EOLIAN static void
_elm_menu_close(Eo *obj, Elm_Menu_Data *sd)
{

View File

@ -32,6 +32,12 @@ class Elm.Menu (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Menu,
@in data: const(void_ptr) @optional; [[Data sent by the callback.]]
}
}
open {
[[Oepn a closed menu
Show the menu with no child sub-enus expanded..
]]
}
close {
[[Close a opened menu