fit zoom button when clicked
This commit is contained in:
parent
598cfbd792
commit
a4c8364581
|
@ -178,11 +178,21 @@ _entice_ctrl_zoomcheck_cb(void *win, Evas_Object *obj, void *event_info EINA_UNU
|
||||||
static void
|
static void
|
||||||
_entice_ctrl_zoomval_cb(void *win, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
_entice_ctrl_zoomval_cb(void *win, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||||
{
|
{
|
||||||
|
char buf[16];
|
||||||
Entice *entice;
|
Entice *entice;
|
||||||
|
Evas_Object *o;
|
||||||
|
|
||||||
printf(" *** zoomval cb\n");
|
printf(" *** zoomval cb\n");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
entice = evas_object_data_get(win, "entice");
|
entice = evas_object_data_get(win, "entice");
|
||||||
|
|
||||||
|
o = elm_button_add(win);
|
||||||
|
elm_object_style_set(o, "overlay");
|
||||||
|
snprintf(buf, sizeof(buf), "%d%%", entice_image_zoom_get(entice->image));
|
||||||
|
elm_object_text_set(o, buf);
|
||||||
|
evas_object_show(o);
|
||||||
|
elm_object_part_content_set(entice->hover_zoom, "middle", o);
|
||||||
|
|
||||||
evas_object_show(entice->hover_zoom);
|
evas_object_show(entice->hover_zoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,7 +394,6 @@ _entice_ctrl_menu_copy_file_cb(void *win,
|
||||||
void
|
void
|
||||||
entice_controls_init(Evas_Object *win)
|
entice_controls_init(Evas_Object *win)
|
||||||
{
|
{
|
||||||
char buf[16];
|
|
||||||
Entice *entice;
|
Entice *entice;
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
Evas_Object *table;
|
Evas_Object *table;
|
||||||
|
@ -477,13 +486,6 @@ entice_controls_init(Evas_Object *win)
|
||||||
|
|
||||||
elm_object_part_content_set(entice->hover_zoom, "top", table);
|
elm_object_part_content_set(entice->hover_zoom, "top", table);
|
||||||
|
|
||||||
o = elm_button_add(win);
|
|
||||||
elm_object_style_set(o, "overlay");
|
|
||||||
snprintf(buf, sizeof(buf), "%d%%", entice_image_zoom_get(entice->image));
|
|
||||||
elm_object_text_set(o, buf);
|
|
||||||
evas_object_show(o);
|
|
||||||
elm_object_part_content_set(entice->hover_zoom, "middle", o);
|
|
||||||
|
|
||||||
/* evas_object_event_callback_add(entice->zoomval, EVAS_CALLBACK_MOUSE_UP, */
|
/* evas_object_event_callback_add(entice->zoomval, EVAS_CALLBACK_MOUSE_UP, */
|
||||||
/* _entice_ctrl_zoomval_mouse_up_cb, entice->hover_zoom); */
|
/* _entice_ctrl_zoomval_mouse_up_cb, entice->hover_zoom); */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue