Inspector: display image in real size when selected

master
Daniel Zaoui 4 years ago
parent b2cf106517
commit da73209747
  1. 22
      src/bin/inspect.c

@ -920,6 +920,26 @@ _gl_clicked_right_cb(void *data, Evas_Object *gl, void *event_info)
}
}
static void
_gl_img_show(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
{
static Eo *_img_win = NULL;
Exactness_Image *ex_img = data;
if (_img_win) efl_del(_img_win);
_img_win = efl_add(EFL_UI_WIN_CLASS, elm_win_get(obj),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_DIALOG_BASIC),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
efl_wref_add(_img_win, &_img_win);
Evas_Object *image = elm_image_add(_img_win);
Eo *evas_img = elm_image_object_get(image);
evas_object_image_size_set(evas_img, ex_img->w, ex_img->h);
evas_object_image_data_set(evas_img, ex_img->pixels);
efl_content_set(_img_win, image);
efl_gfx_entity_size_set(_img_win, EINA_SIZE2D(550, 500));
}
static void
_gui_unit_display(Exactness_Unit *unit1, Exactness_Unit *unit2)
{
@ -1039,7 +1059,7 @@ _gui_unit_display(Exactness_Unit *unit1, Exactness_Unit *unit2)
{
_Item_Info *ii = calloc(1, sizeof(*ii));
eina_hash_set(_item_infos_hash, &img1, ii);
ii->gl_item = elm_genlist_item_append(gl1, _img_itc, img1, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
ii->gl_item = elm_genlist_item_append(gl1, _img_itc, img1, NULL, ELM_GENLIST_ITEM_NONE, _gl_img_show, img1);
if (unit2)
{
_Compare_Item_Data *vv = calloc(1, sizeof(*vv));

Loading…
Cancel
Save