efl ui image - fix scal to fill - broken with non-rect src images

@fix
This commit is contained in:
Carsten Haitzler 2020-08-02 16:26:09 +01:00
parent 3163458619
commit 8a723c1b83
1 changed files with 3 additions and 6 deletions

View File

@ -242,12 +242,9 @@ _image_sizing_eval(Eo *obj, Efl_Ui_Image_Data *sd, Evas_Object *img)
w = ((double)iw * h) / (double)ih;
break;
case EFL_GFX_IMAGE_SCALE_METHOD_EXPAND:
if ((iw - ow) < (ih - oh))
{
w = ow;
h = ((double)ih * w) / (double)iw;
}
else
w = ow;
h = ((double)ih * w) / (double)iw;
if (h < oh)
{
h = oh;
w = ((double)iw * h) / (double)ih;