diff --git a/data/themes/crop.edc b/data/themes/crop.edc index f44dc16..57723c6 100644 --- a/data/themes/crop.edc +++ b/data/themes/crop.edc @@ -95,8 +95,17 @@ collections { 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); + get_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, pox, poy); + if (cx < ix) + pox += ix-cx; + if (cx+cw > ix+iw) + pox += (ix+iw)-(cx+cw); + if (cy < iy) + poy += iy-cy; + if (cy+ch > iy+ih) + poy += (iy+ih)-(cy+ch); + set_state_val(PART:"ephoto.swallow.cropper", STATE_REL1_OFFSET, pox, poy); + set_state_val(PART:"ephoto.swallow.cropper", STATE_REL2_OFFSET, pox, poy); } set_state(PART:"ephoto.swallow.cropper", "custom", 0.0); }