hermet pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0c553f6806fb24ef94c771ad7bf10ebb871300ee
commit 0c553f6806fb24ef94c771ad7bf10ebb871300ee Author: Jee-Yong Um <con...@gmail.com> Date: Mon Feb 23 17:59:52 2015 +0900 elm_box: Fix miscalculated items' size issue in homogeneous box Summary: When box has expanded items (evas_object_size_hint_weight_set() with EVAS_HINT_EXPAND) and homogeneous is set (elm_box_homogeneous_set() with EINA_TRUE), there is a bug that it miscalculates its items size omitting padding size (space among items), so the last item looks cropped or having smaller size than others. This patch makes box calculate its items' size correctly. T2033 Reviewers: Hermet, seoz Subscribers: seoz, Hermet Maniphest Tasks: T2033 Differential Revision: https://phab.enlightenment.org/D2016 --- src/lib/els_box.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/els_box.c b/src/lib/els_box.c index 7a8d386..fdcd3bf 100644 --- a/src/lib/els_box.c +++ b/src/lib/els_box.c @@ -199,7 +199,7 @@ _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, Eina_Bool horizontal if (homogeneous) { - ww = (w / (Evas_Coord)count); + ww = ((w - (count - 1) * priv->pad.h) / (Evas_Coord)count); } else { @@ -231,7 +231,7 @@ _els_box_layout(Evas_Object *o, Evas_Object_Box_Data *priv, Eina_Bool horizontal if (homogeneous) { - hh = (h / (Evas_Coord)count); + hh = ((h - (count - 1) * priv->pad.v) / (Evas_Coord)count); } else { --