discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=6386b8e7ca55ec9d629ca003309be33c91103673

commit 6386b8e7ca55ec9d629ca003309be33c91103673
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Wed Jan 13 15:37:50 2016 -0500

    box: improve aspected layout for non-1:1 ratio aspects
    
    the aspect calc function requires unaliased size params, so don't pass
    aliased params
    
    also clamp min axis size to min aspected item size as intended
---
 src/lib/els_box.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/lib/els_box.c b/src/lib/els_box.c
index 2b3eb9e..fa1fdc9 100644
--- a/src/lib/els_box.c
+++ b/src/lib/els_box.c
@@ -201,9 +201,12 @@ _smart_extents_non_homogeneous_calc(Evas_Object_Box_Data 
*priv, int w, int h, in
              if (ay < 0) fh = 1;
 
              /* if aspecting succeeds, use aspected size for min size */
-             if (_box_object_aspect_calc(rrw, rrh, mnw, mnh, mxw, mxh,
+             if (_box_object_aspect_calc(&ow, &oh, mnw, mnh, mxw, mxh,
                  fw, fh, ww, hh, aspect, asx / (double)asy))
-               *rminh += (*rrh - *rh);
+               {
+                  *rminh += (*rrh - *rh);
+                  if (*rminw < *rrw) *rminw = *rrw;
+               }
           }
         if (*rxw >= 0)
           {

-- 


Reply via email to