forked from enlightenment/enventor
enventor: Add back button on menu screen
Summary: Add back button on menu screen Reviewers: Hermet Differential Revision: https://phab.enlightenment.org/D1321
This commit is contained in:
parent
367ddab33a
commit
06c7aac63d
|
@ -979,6 +979,31 @@ group { name: "menu_layout";
|
|||
fixed: 1 1;
|
||||
}
|
||||
}
|
||||
part { name: "padding7";
|
||||
type: SPACER;
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
rel1.to: "elm.swallow.exit_btn";
|
||||
rel2.to: "elm.swallow.exit_btn";
|
||||
rel1.relative: 1 1;
|
||||
min: 40 23;
|
||||
fixed: 1 1;
|
||||
align: 1 0;
|
||||
}
|
||||
}
|
||||
part { name: "elm.swallow.prev_btn";
|
||||
type: SWALLOW;
|
||||
scale: 1;
|
||||
clip_to: "clipper";
|
||||
description { state: "default" 0.0;
|
||||
rel1.to: "padding7";
|
||||
rel2.to: "padding7";
|
||||
rel2.relative: 1 0;
|
||||
align: 0.5 0;
|
||||
min: 40 40;
|
||||
fixed: 1 1;
|
||||
}
|
||||
}
|
||||
part { name: "event_blocker";
|
||||
type: RECT;
|
||||
description { state: "default" 0.0;
|
||||
|
|
|
@ -319,6 +319,20 @@ exit_btn_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
|||
menu_exit();
|
||||
}
|
||||
|
||||
static void
|
||||
prev_btn_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
menu_data *md = data;
|
||||
if (search_is_opened() || goto_is_opened())
|
||||
{
|
||||
goto_close();
|
||||
search_close();
|
||||
edit_focus_set(md->ed);
|
||||
}
|
||||
menu_toggle();
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
btn_create(Evas_Object *parent, const char *label, Evas_Smart_Cb cb, void *data)
|
||||
{
|
||||
|
@ -648,6 +662,15 @@ menu_open(menu_data *md)
|
|||
elm_object_part_content_set(layout, "elm.swallow.exit_btn", btn);
|
||||
ecore_timer_add(0.15, btn_effect_timer_cb, btn);
|
||||
|
||||
//Button(Prev)
|
||||
btn = elm_button_add(layout);
|
||||
elm_object_style_set(btn, "anchor");
|
||||
evas_object_smart_callback_add(btn, "clicked", prev_btn_cb, md);
|
||||
elm_object_text_set(btn, "Back");
|
||||
evas_object_show(btn);
|
||||
elm_object_part_content_set(layout, "elm.swallow.prev_btn", btn);
|
||||
ecore_timer_add(0.15, btn_effect_timer_cb, btn);
|
||||
|
||||
md->menu_layout = layout;
|
||||
md->active_request++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue