hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=46ee203331d596ac3aa1ec48b729be42c084088a

commit 46ee203331d596ac3aa1ec48b729be42c084088a
Author: Hermet Park <hermetp...@gmail.com>
Date:   Mon Dec 23 15:42:17 2019 +0900

    ui image: fix scale_method expand behavior.
    
    As efl_gfx_image_expand specification,
    it scales the image to cover the entire object area on one axis
    while maintaining the aspect ratio though image may become larger than the 
object.
    
    Thus, this option must work as one of fit_width / fit_height
    by detertimining either way.
    
    Previously, it was logically wrong.
    
    @fix
---
 src/lib/elementary/efl_ui_image.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/lib/elementary/efl_ui_image.c 
b/src/lib/elementary/efl_ui_image.c
index b110e9d998..213d55edd2 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -215,27 +215,22 @@ _image_sizing_eval(Eo *obj, Efl_Ui_Image_Data *sd, 
Evas_Object *img)
            case EFL_GFX_IMAGE_SCALE_METHOD_FIT:
               w = ow;
               h = ((double)ih * w) / (double)iw;
-
               if (h > oh)
                 {
                    h = oh;
                    w = ((double)iw * h) / (double)ih;
                 }
-
-
               break;
            case EFL_GFX_IMAGE_SCALE_METHOD_FIT_WIDTH:
               w = ow;
               h = ((double)ih * w) / (double)iw;
-
               break;
            case EFL_GFX_IMAGE_SCALE_METHOD_FIT_HEIGHT:
               h = oh;
               w = ((double)iw * h) / (double)ih;
-
               break;
            case EFL_GFX_IMAGE_SCALE_METHOD_EXPAND:
-              if (ow > oh)
+              if (iw < ih)
                 {
                    w = ow;
                    h = ((double)ih * w) / (double)iw;

-- 


Reply via email to