forked from enlightenment/enlightenment
Fix toolbar layer.
Modify e_gadcon so that the "Stop resizing this item" menu appears for toolbar. No need to get w & h from the canvas to pop the menu, only need x & y. SVN revision: 32730
This commit is contained in:
parent
7becf3b101
commit
36c6082b05
|
@ -1699,9 +1699,12 @@ _e_gadcon_cb_client_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *e
|
|||
ev = event_info;
|
||||
if (ev->button == 3)
|
||||
{
|
||||
E_Zone *zone;
|
||||
E_Menu *mn;
|
||||
E_Menu_Item *mi;
|
||||
int cx, cy, cw, ch;
|
||||
int cx, cy;
|
||||
|
||||
zone = e_util_zone_current_get(e_manager_current_get()),
|
||||
|
||||
mn = e_menu_new();
|
||||
e_menu_post_deactivate_callback_set(mn, _e_gadcon_client_cb_menu_post,
|
||||
|
@ -1720,14 +1723,18 @@ _e_gadcon_cb_client_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *e
|
|||
|
||||
gcc->gadcon->menu_attach.func(gcc->gadcon->menu_attach.data, mn);
|
||||
}
|
||||
|
||||
e_gadcon_canvas_zone_geometry_get(gcc->gadcon, &cx, &cy, &cw, &ch);
|
||||
e_menu_activate_mouse(mn,
|
||||
e_util_zone_current_get(e_manager_current_get()),
|
||||
cx + ev->output.x, cy + ev->output.y, 1, 1,
|
||||
|
||||
if (gcc->gadcon->toolbar)
|
||||
ecore_x_pointer_xy_get(zone->container->win, &cx, &cy);
|
||||
else
|
||||
{
|
||||
e_gadcon_canvas_zone_geometry_get(gcc->gadcon, &cx, &cy, NULL, NULL);
|
||||
cx = cx + ev->output.x;
|
||||
cy = cy + ev->output.y;
|
||||
}
|
||||
e_menu_activate_mouse(mn, zone, cx, cy, 1, 1,
|
||||
E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
|
||||
e_util_evas_fake_mouse_up_later(gcc->gadcon->evas,
|
||||
ev->button);
|
||||
e_util_evas_fake_mouse_up_later(gcc->gadcon->evas, ev->button);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -80,12 +80,13 @@ e_toolbar_new(Evas *evas, const char *name, E_Win *fwin, Evas_Object *fm2)
|
|||
evas_object_resize(tbar->o_event, tbar->w, tbar->h);
|
||||
evas_object_event_callback_add(tbar->o_event, EVAS_CALLBACK_MOUSE_DOWN,
|
||||
_e_toolbar_cb_mouse_down, tbar);
|
||||
evas_object_layer_set(tbar->o_event, 0);
|
||||
evas_object_show(tbar->o_event);
|
||||
|
||||
tbar->o_base = edje_object_add(evas);
|
||||
evas_object_resize(tbar->o_base, tbar->w, tbar->h);
|
||||
e_theme_edje_object_set(tbar->o_base, "base/theme/toolbar",
|
||||
"e/toolbar/default/base");
|
||||
evas_object_show(tbar->o_base);
|
||||
|
||||
e_toolbar_move_resize(tbar, tbar->x, tbar->y, tbar->w, tbar->h);
|
||||
|
||||
|
|
Loading…
Reference in New Issue