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
This commit is contained in:
parent
f7024e8830
commit
fe3bacf30a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue