summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2014-12-31 15:30:57 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2014-12-31 15:32:29 -0500
commit24dc50ea12446f2ecb639c26de366733baaf0c81 (patch)
tree44cdbf3330c527065d0d576107b098bbae9ceccf
parent75f8448a001dbe73bb56e53759af603ee857294a (diff)
downloadelementary-24dc50ea12446f2ecb639c26de366733baaf0c81.tar.gz
box layout should not silently fail when size is less than min size hint
this broke box display in any case where the user had manually changed size hints, eg. when using box align @fix
-rw-r--r--src/lib/els_box.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/els_box.c b/src/lib/els_box.c
index 3d0566bc1..7a8d38674 100644
--- a/src/lib/els_box.c
+++ b/src/lib/els_box.c
@@ -137,7 +137,17 @@ _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, Eina_Bool horizontal
evas_object_geometry_get(o, &x, &y, &w, &h);
evas_object_size_hint_min_get(o, &minw, &minh);
- if ((w < minw) || (h < minh)) return;
+ evas_object_box_align_get(o, &ax, &ay);
+ if (w < minw)
+ {
+ x = x + ((w - minw) * (1.0 - ax));
+ w = minw;
+ }
+ if (h < minh)
+ {
+ y = y + ((h - minh) * (1.0 - ay));
+ h = minh;
+ }
count = eina_list_count(priv->children);
/* accummulate expand as same way but after switched x and y for horizontal mode */
@@ -152,7 +162,6 @@ _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, Eina_Bool horizontal
}
if (!expand)
{
- evas_object_box_align_get(o, &ax, &ay);
if (rtl) ax = 1.0 - ax;
if (horizontal)
{