summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-01-13 15:37:50 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-01-13 15:37:50 -0500
commit6386b8e7ca55ec9d629ca003309be33c91103673 (patch)
treea0b04200ab90e9637373e7d3d4a2f3f026dfde25
parent17553e2a3572d943ebe1a0aa72eba8ec29add857 (diff)
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
-rw-r--r--src/lib/els_box.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/els_box.c b/src/lib/els_box.c
index 2b3eb9e15..fa1fdc938 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
201 if (ay < 0) fh = 1; 201 if (ay < 0) fh = 1;
202 202
203 /* if aspecting succeeds, use aspected size for min size */ 203 /* if aspecting succeeds, use aspected size for min size */
204 if (_box_object_aspect_calc(rrw, rrh, mnw, mnh, mxw, mxh, 204 if (_box_object_aspect_calc(&ow, &oh, mnw, mnh, mxw, mxh,
205 fw, fh, ww, hh, aspect, asx / (double)asy)) 205 fw, fh, ww, hh, aspect, asx / (double)asy))
206 *rminh += (*rrh - *rh); 206 {
207 *rminh += (*rrh - *rh);
208 if (*rminw < *rrw) *rminw = *rrw;
209 }
207 } 210 }
208 if (*rxw >= 0) 211 if (*rxw >= 0)
209 { 212 {