diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2019-05-29 09:31:33 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@samsung.com> | 2019-05-29 12:29:04 -0400 |
commit | 7b5fa23e9bee76531ec8f9ce6d17f06c9a18c3de (patch) | |
tree | 61533e6eee83b40daa2989a99b142195c6460e78 /src/lib/emotion/emotion_smart.c | |
parent | 05e70b25d51a264e0c34265040520eaf35831bb5 (diff) |
emotion: don't update crop clipper geometry if crop clipper doesn't exist
Summary:
this object does not exist if no image border is set
@fix
Depends on D9002
Reviewers: cedric
Reviewed By: cedric
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D9003
Diffstat (limited to '')
-rw-r--r-- | src/lib/emotion/emotion_smart.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c index e2243c818d..d733e41029 100644 --- a/src/lib/emotion/emotion_smart.c +++ b/src/lib/emotion/emotion_smart.c | |||
@@ -204,12 +204,12 @@ _clipper_position_size_update(Evas_Object *obj, int x, int y, int w, int h, int | |||
204 | evas_object_image_fill_set(sd->obj, 0, 0, 0, 0); | 204 | evas_object_image_fill_set(sd->obj, 0, 0, 0, 0); |
205 | evas_object_move(sd->obj, x, y); | 205 | evas_object_move(sd->obj, x, y); |
206 | evas_object_resize(sd->obj, 0, 0); | 206 | evas_object_resize(sd->obj, 0, 0); |
207 | if (!sd->crop.clipper) return; | ||
207 | evas_object_move(sd->crop.clipper, x, y); | 208 | evas_object_move(sd->crop.clipper, x, y); |
208 | evas_object_resize(sd->crop.clipper, 0, 0); | 209 | evas_object_resize(sd->crop.clipper, 0, 0); |
209 | } | 210 | } |
210 | else | 211 | else |
211 | { | 212 | { |
212 | evas_object_move(sd->crop.clipper, x, y); | ||
213 | scale_w = (double)w / (double)(vid_w - sd->crop.l - sd->crop.r); | 213 | scale_w = (double)w / (double)(vid_w - sd->crop.l - sd->crop.r); |
214 | scale_h = (double)h / (double)(vid_h - sd->crop.t - sd->crop.b); | 214 | scale_h = (double)h / (double)(vid_h - sd->crop.t - sd->crop.b); |
215 | 215 | ||
@@ -219,6 +219,8 @@ _clipper_position_size_update(Evas_Object *obj, int x, int y, int w, int h, int | |||
219 | evas_object_image_fill_set(sd->obj, 0, 0, sd->fill.w * w, sd->fill.h * h); | 219 | evas_object_image_fill_set(sd->obj, 0, 0, sd->fill.w * w, sd->fill.h * h); |
220 | evas_object_resize(sd->obj, vid_w * scale_w, vid_h * scale_h); | 220 | evas_object_resize(sd->obj, vid_w * scale_w, vid_h * scale_h); |
221 | evas_object_move(sd->obj, x - sd->crop.l * scale_w, y - sd->crop.t * scale_h); | 221 | evas_object_move(sd->obj, x - sd->crop.l * scale_w, y - sd->crop.t * scale_h); |
222 | if (!sd->crop.clipper) return; | ||
223 | evas_object_move(sd->crop.clipper, x, y); | ||
222 | evas_object_resize(sd->crop.clipper, w, h); | 224 | evas_object_resize(sd->crop.clipper, w, h); |
223 | } | 225 | } |
224 | } | 226 | } |