summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-08-02 16:26:09 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-08-02 16:27:24 +0100
commit8a723c1b83d11e5454d7ccd0ee4d41ab9a8d974c (patch)
tree1a30f455eb1151a7a472d9c00cd623c3296e99b5
parent316345861936fd259e15f56329b5810ff5861b5b (diff)
efl ui image - fix scal to fill - broken with non-rect src images
@fix
-rw-r--r--src/lib/elementary/efl_ui_image.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index 5bf297854c..a5ee31db9e 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -242,12 +242,9 @@ _image_sizing_eval(Eo *obj, Efl_Ui_Image_Data *sd, Evas_Object *img)
242 w = ((double)iw * h) / (double)ih; 242 w = ((double)iw * h) / (double)ih;
243 break; 243 break;
244 case EFL_GFX_IMAGE_SCALE_METHOD_EXPAND: 244 case EFL_GFX_IMAGE_SCALE_METHOD_EXPAND:
245 if ((iw - ow) < (ih - oh)) 245 w = ow;
246 { 246 h = ((double)ih * w) / (double)iw;
247 w = ow; 247 if (h < oh)
248 h = ((double)ih * w) / (double)iw;
249 }
250 else
251 { 248 {
252 h = oh; 249 h = oh;
253 w = ((double)iw * h) / (double)ih; 250 w = ((double)iw * h) / (double)ih;