Ephoto: Keep cropper from disappearing on zoom.

This commit is contained in:
Stephen Houston 2015-02-20 13:51:34 -06:00
parent e812fca066
commit 7be54bd65d
2 changed files with 12 additions and 0 deletions

View File

@ -94,6 +94,10 @@ collections {
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, pox, poy);
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, ppox, ppoy);
}
if (movetype == 9) {
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, 0, 0);
set_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, 0, 0);
}
set_state(PART:"ephoto.swallow.cropper", "custom", 0.0);
}
}

View File

@ -269,6 +269,7 @@ static void
_image_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Ephoto_Cropper *ec = data;
Edje_Message_Int_Set *msg;
int sx, sy, sw, sh, iw, ih, diffw, diffh;
int cx, cy, cw, ch, ix, iy;
@ -316,6 +317,13 @@ _image_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
evas_object_resize(ec->layout, nw, nh);
evas_object_move(ec->layout, ix, iy);
msg = alloca(sizeof(Edje_Message_Int_Set) + (3*sizeof(int)));
msg->count = 3;
msg->val[0] = 9;
msg->val[1] = 0;
msg->val[2] = 0;
edje_object_message_send(elm_layout_edje_get(ec->layout), EDJE_MESSAGE_INT_SET, 1, msg);
}
static void