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:26:09 +0100
commit87bcc82976be023027dea04d1761fad58819846e (patch)
treee2a6ff964547c5e40d542b6d3873b7aff577134f
parent5ed0161564729388c970889518c903cdef5ff22e (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 35c3ac8168..1cabdf32c3 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;