diff options
author | jiin.moon <jiin.moon@samsung.com> | 2014-12-18 17:53:44 +0900 |
---|---|---|
committer | ChunEon Park <hermet@hermet.pe.kr> | 2014-12-18 17:58:02 +0900 |
commit | 45d93cc88635084d7c4a086ae151c0878cb4ff17 (patch) | |
tree | 67a6855693974206676922751e0673f3fa744a12 | |
parent | 64491def7e8ac1d560b4c3207c86c13184c5bcc2 (diff) | |
download | elementary-45d93cc88635084d7c4a086ae151c0878cb4ff17.tar.gz |
elm/image: Fix an unclipped issue about image bigger than object size
Summary:
When resizes an image
if "fill_inside" and "aspect_fixed" in Elm_Image_Data struct are "TRUE",
extra width or height go outside of the object area.
The width or height on outside will be clipped.
@fix
Reviewers: Hermet
Differential Revision: https://phab.enlightenment.org/D1794
-rw-r--r-- | src/lib/elm_image.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c index cab94bf65..e7076b8f3 100644 --- a/src/lib/elm_image.c +++ b/src/lib/elm_image.c @@ -183,6 +183,10 @@ _elm_image_internal_sizing_eval(Evas_Object *obj, Elm_Image_Data *sd) evas_object_move(sd->img, x, y); evas_object_image_fill_set(sd->img, 0, 0, w, h); + + if (x < 0) w+=x; + if (y < 0) h+=y; + evas_object_resize(sd->img, w, h); } evas_object_move(sd->hit_rect, x, y); |