summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2019-02-13 08:38:58 -0500
committerMike Blumenkrantz <zmike@samsung.com>2019-02-13 09:23:01 -0500
commit846492ebd7b86d2f4f5d2ab7b002a1ac19ce5b82 (patch)
treeea0ea8b947f7c2dd702148c52ed2632eca085746
parent0ab6c36404ffe7bb4b343967097f2fc9e8ed6ca6 (diff)
ui.box: refactor layout_update
Summary: Current layout_update doesn't consider max hint priority. for example, if it has hint_max, the size is hint_max value regardless of weight or fill. moreover, if it has hint_aspect with hint_max, hint_min can be ignored. (test that aspect(1,3) max(50,150), min(70, 70) then, size has (50, 150)) It seems that hint_max is considered as high priority. however, if hint_min greater than hint_max, hint_max is ignored. In order to resolve the hint priority conflict, this refactoring supports following hint priority. 1) HintMin 2) HintMin + HintAspect 3) HintMargin 4) HintMax 5) HintAspect 6) HintWeight, HintFill 7) HintAlign ref T5487 Specific unit test is D7463 Test Plan: make check elementary_test -to 'efl.ui.box' Reviewers: jpeg, Jaehyun_Cho, zmike Reviewed By: zmike Subscribers: segfaultxavi, zmike, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T5487 Differential Revision: https://phab.enlightenment.org/D7750
-rw-r--r--src/lib/elementary/efl_ui_box_layout.c425
1 files changed, 177 insertions, 248 deletions
diff --git a/src/lib/elementary/efl_ui_box_layout.c b/src/lib/elementary/efl_ui_box_layout.c
index c42dd740a1..8f8cc4d661 100644
--- a/src/lib/elementary/efl_ui_box_layout.c
+++ b/src/lib/elementary/efl_ui_box_layout.c
@@ -2,23 +2,76 @@
2 2
3#include "efl_ui_box_private.h" 3#include "efl_ui_box_private.h"
4 4
5// FIXME: Aspect support is not implemented
6// FIXME: handle RTL? just invert the horizontal order? 5// FIXME: handle RTL? just invert the horizontal order?
7 6
8typedef struct _Item_Calc Item_Calc; 7typedef struct _Item_Calc Item_Calc;
9 8
10struct _Item_Calc 9struct _Item_Calc
11{ 10{
11 EINA_INLIST;
12
12 Evas_Object *obj; 13 Evas_Object *obj;
13 double weight[2]; 14 double weight[2];
14 double align[2]; 15 double align[2];
16 double space[2];
17 double comp_factor;
15 Eina_Bool fill[2]; 18 Eina_Bool fill[2];
16 Eina_Size2D max, want, aspect; 19 Eina_Size2D max, min, aspect;
17 int pad[4]; 20 int pad[4];
18 Efl_Gfx_Size_Hint_Aspect aspect_type; 21 Efl_Gfx_Size_Hint_Aspect aspect_type;
19 int id; 22 int id;
20}; 23};
21 24
25static int
26weight_sort_cb(const void *l1, const void *l2)
27{
28 Item_Calc *it1, *it2;
29
30 it1 = EINA_INLIST_CONTAINER_GET(l1, Item_Calc);
31 it2 = EINA_INLIST_CONTAINER_GET(l2, Item_Calc);
32
33 return it2->comp_factor <= it1->comp_factor ? -1 : 1;
34}
35
36static inline void
37_min_max_calc(Item_Calc *item, int *cw, int *ch, Eina_Bool aspect_check)
38{
39 int w = *cw, h = *ch;
40
41 if (aspect_check)
42 {
43 w = h * item->aspect.w / item->aspect.h;
44 if (w > *cw)
45 {
46 w = *cw;
47 h = w * item->aspect.h / item->aspect.w;
48 }
49 }
50
51 if (w > item->max.w)
52 {
53 w = item->max.w;
54 if (aspect_check) h = w * item->aspect.h / item->aspect.w;
55 }
56 if (h > item->max.h)
57 {
58 h = item->max.h;
59 if (aspect_check) w = h * item->aspect.w / item->aspect.h;
60 }
61 if (w < item->min.w)
62 {
63 w = item->min.w;
64 if (aspect_check) h = w * item->aspect.h / item->aspect.w;
65 }
66 if (h < item->min.h)
67 {
68 h = item->min.h;
69 if (aspect_check) w = h * item->aspect.w / item->aspect.h;
70 }
71 *cw = w;
72 *ch = h;
73}
74
22void 75void
23_efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd) 76_efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
24{ 77{
@@ -26,20 +79,20 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
26 Evas_Object_Box_Option *opt; 79 Evas_Object_Box_Option *opt;
27 Evas_Object *o; 80 Evas_Object *o;
28 Eina_List *li; 81 Eina_List *li;
82 Eina_Inlist *inlist = NULL;
29 int wantw = 0, wanth = 0; // requested size 83 int wantw = 0, wanth = 0; // requested size
30 int boxx, boxy, boxw, boxh; 84 Eina_Rect boxs;
31 Item_Calc *items, *item; 85 Item_Calc *items, *item;
32 Eina_Bool horiz = efl_ui_dir_is_horizontal(pd->dir, EINA_FALSE); 86 Eina_Bool horiz = efl_ui_dir_is_horizontal(pd->dir, EINA_FALSE);
33 Eina_Bool zeroweight = EINA_FALSE;
34 int id = 0, count, boxl = 0, boxr = 0, boxt = 0, boxb = 0; 87 int id = 0, count, boxl = 0, boxr = 0, boxt = 0, boxb = 0;
35 int length, want, pad, extra = 0, rounding = 0; 88 int length, want, pad;
36 double cur_pos = 0, weight[2] = { 0, 0 }, scale; 89 double cur_pos, weight[2] = { 0, 0 }, scale;
37 double box_align[2]; 90 double box_align[2];
38 Eina_Bool box_fill[2] = { EINA_FALSE, EINA_FALSE }; 91 Eina_Bool box_fill[2] = { EINA_FALSE, EINA_FALSE };
39 92
40 evas_object_geometry_get(ui_box, &boxx, &boxy, &boxw, &boxh); 93 boxs = efl_gfx_entity_geometry_get(ui_box);
41 efl_gfx_size_hint_margin_get(ui_box, &boxl, &boxr, &boxt, &boxb); 94 efl_gfx_size_hint_margin_get(ui_box, &boxl, &boxr, &boxt, &boxb);
42 scale = evas_object_scale_get(ui_box); 95 scale = efl_gfx_entity_scale_get(ui_box);
43 96
44 // Box align: used if "item has max size and fill" or "no item has a weight" 97 // Box align: used if "item has max size and fill" or "no item has a weight"
45 // Note: cells always expand on the orthogonal direction 98 // Note: cells always expand on the orthogonal direction
@@ -59,7 +112,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
59 count = eina_list_count(bd->children); 112 count = eina_list_count(bd->children);
60 if (!count) 113 if (!count)
61 { 114 {
62 evas_object_size_hint_min_set(ui_box, 0, 0); 115 efl_gfx_size_hint_min_set(ui_box, EINA_SIZE2D(0, 0));
63 return; 116 return;
64 } 117 }
65 118
@@ -68,6 +121,12 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
68 memset(items, 0, count * sizeof(*items)); 121 memset(items, 0, count * sizeof(*items));
69#endif 122#endif
70 123
124 // box outer margin
125 boxs.w -= boxl + boxr;
126 boxs.h -= boxt + boxb;
127 boxs.x += boxl;
128 boxs.y += boxt;
129
71 // scan all items, get their properties, calculate total weight & min size 130 // scan all items, get their properties, calculate total weight & min size
72 EINA_LIST_FOREACH(bd->children, li, opt) 131 EINA_LIST_FOREACH(bd->children, li, opt)
73 { 132 {
@@ -79,321 +138,191 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, Evas_Object_Box_Data *bd)
79 efl_gfx_size_hint_margin_get(o, &item->pad[0], &item->pad[1], &item->pad[2], &item->pad[3]); 138 efl_gfx_size_hint_margin_get(o, &item->pad[0], &item->pad[1], &item->pad[2], &item->pad[3]);
80 efl_gfx_size_hint_fill_get(o, &item->fill[0], &item->fill[1]); 139 efl_gfx_size_hint_fill_get(o, &item->fill[0], &item->fill[1]);
81 item->max = efl_gfx_size_hint_max_get(o); 140 item->max = efl_gfx_size_hint_max_get(o);
82 item->want = efl_gfx_size_hint_combined_min_get(o); 141 item->min = efl_gfx_size_hint_combined_min_get(o);
83 efl_gfx_size_hint_aspect_get(o, &item->aspect_type, &item->aspect); 142 efl_gfx_size_hint_aspect_get(o, &item->aspect_type, &item->aspect);
84 143
85 if (item->weight[0] < 0) item->weight[0] = 0; 144 if (horiz && box_fill[0]) item->weight[0] = 1;
86 if (item->weight[1] < 0) item->weight[1] = 0; 145 else if (item->weight[0] < 0) item->weight[0] = 0;
146 if (!horiz && box_fill[1]) item->weight[1] = 1;
147 else if (item->weight[1] < 0) item->weight[1] = 0;
87 148
88 if (EINA_DBL_EQ(item->align[0], -1)) 149 if (EINA_DBL_EQ(item->align[0], -1))
89 { 150 {
90 item->align[0] = 0.5; 151 item->align[0] = 0.5;
91 item->fill[0] = EINA_TRUE; 152 item->fill[0] = EINA_TRUE;
92 } 153 }
93 else if (item->align[0] < 0) 154 else if (item->align[0] < 0) item->align[0] = 0;
94 { 155 else if (item->align[0] > 1) item->align[0] = 1;
95 item->align[0] = 0;
96 }
97 if (EINA_DBL_EQ(item->align[1], -1)) 156 if (EINA_DBL_EQ(item->align[1], -1))
98 { 157 {
99 item->align[1] = 0.5; 158 item->align[1] = 0.5;
100 item->fill[1] = EINA_TRUE; 159 item->fill[1] = EINA_TRUE;
101 } 160 }
102 else if (item->align[1] < 0) 161 else if (item->align[1] < 0) item->align[1] = 0;
103 { 162 else if (item->align[1] > 1) item->align[1] = 1;
104 item->align[1] = 0;
105 }
106 if (item->align[0] > 1) item->align[0] = 1;
107 if (item->align[1] > 1) item->align[1] = 1;
108 163
109 if (item->want.w < 0) item->want.w = 0; 164 if (item->min.w < 0) item->min.w = 0;
110 if (item->want.h < 0) item->want.h = 0; 165 if (item->min.h < 0) item->min.h = 0;
111 166
112 if (item->max.w < 0) item->max.w = INT_MAX; 167 if (item->max.w < 0) item->max.w = INT_MAX;
113 if (item->max.h < 0) item->max.h = INT_MAX; 168 if (item->max.h < 0) item->max.h = INT_MAX;
114 169
115 if (item->aspect.w <= 0 || item->aspect.h <= 0) 170 weight[0] += item->weight[0];
116 { 171 weight[1] += item->weight[1];
117 if (item->aspect_type >= EFL_GFX_SIZE_HINT_ASPECT_HORIZONTAL)
118 ERR("Invalid aspect parameter for obj: %p", item->obj);
119 item->aspect.w = item->aspect.h = 0;
120 item->aspect_type = EFL_GFX_SIZE_HINT_ASPECT_NONE;
121 }
122 172
123 if (item->aspect_type >= EFL_GFX_SIZE_HINT_ASPECT_HORIZONTAL) 173 if ((item->aspect.w <= 0) || (item->aspect.h <= 0))
124 { 174 {
125 double w, h; 175 if ((item->aspect.w <= 0) ^ (item->aspect.h <= 0))
126
127 w = item->want.w;
128 h = w * item->aspect.h / item->aspect.w;
129 if (h < item->want.h)
130 { 176 {
131 h = item->want.h; 177 ERR("Invalid aspect parameter for obj: %p", item->obj);
132 w = h * item->aspect.w / item->aspect.h; 178 item->aspect.w = item->aspect.h = 0;
179 item->aspect_type = EFL_GFX_SIZE_HINT_ASPECT_NONE;
133 } 180 }
134
135 if (horiz)
136 {
137 if (item->fill[1] && (h < boxh))
138 {
139 double w1, h1;
140 h1 = item->max.h > 0 ? MIN(boxh, item->max.h) : boxh;
141 h1 = MAX(h, h1);
142 w1 = h1 * item->aspect.w / item->aspect.h;
143 w = item->max.w > 0 ? MIN(w1, item->max.w) : w1;
144 }
145 }
146 else
147 {
148 if (item->fill[0] && (w < boxw))
149 {
150 double w1, h1;
151 w1 = item->max.w > 0 ? MIN(boxw, item->max.w) : boxw;
152 w1 = MAX(w, w1);
153 h1 = w1 * item->aspect.h / item->aspect.w;
154 h = item->max.h > 0 ? MIN(h1, item->max.h) : h1;
155 }
156 }
157 item->want.w = w;
158 item->want.h = h;
159 } 181 }
160 if (item->max.w < item->want.w) item->max.w = item->want.w; 182 else
161 if (item->max.h < item->want.h) item->max.h = item->want.h; 183 {
184 _min_max_calc(item, &item->min.w, &item->min.h, EINA_TRUE);
185 }
162 186
163 item->want.w += item->pad[0] + item->pad[1]; 187 item->space[0] = item->min.w + item->pad[0] + item->pad[1];
164 item->want.h += item->pad[2] + item->pad[3]; 188 item->space[1] = item->min.h + item->pad[2] + item->pad[3];
165 189
166 weight[0] += item->weight[0];
167 weight[1] += item->weight[1];
168 if (horiz) 190 if (horiz)
169 { 191 {
170 wantw += item->want.w; 192 if (item->space[1] > wanth)
171 if (item->want.h > wanth) 193 wanth = item->space[1];
172 wanth = item->want.h; 194 wantw += item->space[0];
173 } 195 }
174 else 196 else
175 { 197 {
176 wanth += item->want.h; 198 if (item->space[0] > wantw)
177 if (item->want.w > wantw) 199 wantw = item->space[0];
178 wantw = item->want.w; 200 wanth += item->space[1];
179 } 201 }
180 202
181 item->id = id++; 203 item->id = id++;
182 } 204 }
183 205
184 // box outer margin
185 boxw -= boxl + boxr;
186 boxh -= boxt + boxb;
187 boxx += boxl;
188 boxy += boxt;
189
190 // total space & available space 206 // total space & available space
191 if (horiz) 207 if (horiz)
192 { 208 {
193 length = boxw;
194 want = wantw; 209 want = wantw;
210 length = boxs.w;
195 pad = pd->pad.scalable ? (pd->pad.h * scale) : pd->pad.h; 211 pad = pd->pad.scalable ? (pd->pad.h * scale) : pd->pad.h;
212 if (boxs.h < wanth)
213 boxs.h = wanth;
196 } 214 }
197 else 215 else
198 { 216 {
199 length = boxh;
200 want = wanth; 217 want = wanth;
218 length = boxs.h;
201 pad = pd->pad.scalable ? (pd->pad.v * scale) : pd->pad.v; 219 pad = pd->pad.scalable ? (pd->pad.v * scale) : pd->pad.v;
220 if (boxs.w < wantw)
221 boxs.w = wantw;
202 } 222 }
203 223
204 // padding can not be squeezed (note: could make it an option) 224 // padding can not be squeezed (note: could make it an option)
205 length -= pad * (count - 1); 225 length -= pad * (count - 1);
226 cur_pos = horiz ? boxs.x : boxs.y;
206 227
207 // available space. if <0 we overflow 228 // calculate weight length
208 extra = length - want; 229 if ((length > want) && (weight[!horiz] > 0))
209
210 if (horiz)
211 {
212 evas_object_size_hint_min_set(ui_box,
213 wantw + boxl + boxr + pad * (count - 1),
214 wanth + boxt + boxb);
215 }
216 else
217 { 230 {
218 evas_object_size_hint_min_set(ui_box, 231 int orig_length = length;
219 wantw + boxl + boxr, 232 double orig_weight = weight[!horiz];
220 wanth + pad * (count - 1) + boxt + boxb);
221 }
222
223 if (extra < 0) extra = 0;
224 233
225 if (EINA_DBL_EQ(weight[!horiz], 0)) 234 for (id = 0; id < count; id++)
226 {
227 if (box_fill[!horiz])
228 { 235 {
229 // box is filled, set all weights to be equal 236 double denom;
230 zeroweight = EINA_TRUE; 237 item = &items[id];
231 }
232 else
233 {
234 // move bounding box according to box align
235 cur_pos = extra * box_align[!horiz];
236 }
237 weight[!horiz] = count;
238 }
239
240 for (id = 0; id < count; id++)
241 {
242 double cx, cy, cw, ch, x, y, w, h;
243 item = &items[id];
244 238
245 // extra rounding up (compensate cumulative error) 239 denom = (item->weight[!horiz] * orig_length) -
246 if ((item->id == (count - 1)) && (cur_pos - floor(cur_pos) >= 0.5)) 240 (orig_weight * item->space[!horiz]);
247 rounding = 1; 241 if (denom > 0)
248
249 if (horiz)
250 {
251 cx = boxx + cur_pos;
252 cy = boxy;
253 cw = item->want.w + rounding + (zeroweight ? 1.0 : item->weight[0]) * extra / weight[0];
254 ch = boxh;
255 cur_pos += cw + pad;
256 }
257 else
258 {
259 cx = boxx;
260 cy = boxy + cur_pos;
261 cw = boxw;
262 ch = item->want.h + rounding + (zeroweight ? 1.0 : item->weight[1]) * extra / weight[1];
263 cur_pos += ch + pad;
264 }
265
266 if (item->aspect_type >= EFL_GFX_SIZE_HINT_ASPECT_HORIZONTAL)
267 {
268 if (horiz)
269 { 242 {
270 w = item->want.w; 243 item->comp_factor = (item->weight[!horiz] * orig_length) / denom;
271 h = item->want.h; 244 inlist = eina_inlist_sorted_insert(inlist, EINA_INLIST_GET(item),
272 if (weight[0] > 0) 245 weight_sort_cb);
273 w = item->want.w + extra * item->weight[0] / weight[0];
274 h = w * item->aspect.h / item->aspect.w;
275
276 if (item->aspect_type == EFL_GFX_SIZE_HINT_ASPECT_BOTH ||
277 item->aspect_type == EFL_GFX_SIZE_HINT_ASPECT_VERTICAL)
278 {
279 if (h > boxh)
280 {
281 h = boxh;
282 w = h * item->aspect.w / item->aspect.h;
283 }
284 }
285 } 246 }
286 else 247 else
287 { 248 {
288 w = item->want.w; 249 length -= item->space[!horiz];
289 h = item->want.h; 250 weight[!horiz] -= item->weight[!horiz];
290 if (weight[1] > 0)
291 h = item->want.h + extra * item->weight[1] / weight[1];
292 w = h * item->aspect.w / item->aspect.h;
293
294 if (item->aspect_type == EFL_GFX_SIZE_HINT_ASPECT_BOTH ||
295 item->aspect_type == EFL_GFX_SIZE_HINT_ASPECT_HORIZONTAL)
296 {
297 if (w > boxw)
298 {
299 w = boxw;
300 h = w * item->aspect.h / item->aspect.w;
301 }
302 }
303 } 251 }
252 }
304 253
305 if ((item->max.w != INT_MAX) && (item->max.h != INT_MAX)) 254 EINA_INLIST_FOREACH(inlist, item)
306 { 255 {
307 double mar, ar; 256 double weight_len;
308 mar = item->max.w / (double)item->max.h; 257
309 ar = item->aspect.w / (double)item->aspect.h; 258 weight_len = (length * item->weight[!horiz]) / weight[!horiz];
310 if (ar < mar) 259 if (item->space[!horiz] < weight_len)
311 {
312 if (h > item->max.h)
313 {
314 h = item->max.h;
315 w = h * item->aspect.w / item->aspect.h;
316 }
317 }
318 else
319 {
320 if (w > item->max.w)
321 {
322 w = item->max.w;
323 h = w * item->aspect.h / item->aspect.w;
324 }
325 }
326 }
327 else if (item->max.w != INT_MAX)
328 { 260 {
329 w = MIN(w, MAX(item->want.w, item->max.w)); 261 item->space[!horiz] = weight_len;
330 h = w * item->aspect.h / item->aspect.w;
331 } 262 }
332 else 263 else
333 { 264 {
334 h = MIN(h, MAX(item->want.h, item->max.h)); 265 weight[!horiz] -= item->weight[!horiz];
335 w = h * item->aspect.w / item->aspect.h; 266 length -= item->space[!horiz];
336 } 267 }
337 w = w - item->pad[0] - item->pad[1]; 268 }
338 h = h - item->pad[2] - item->pad[3]; 269 }
339 270
340 if (item->fill[0]) 271 // calculate item geometry
341 x = cx + (cw - w) * 0.5 + item->pad[0]; 272 {
342 else 273 int x, y, w, h, sw, sh;
343 x = cx + (cw - w) * item->align[0] + item->pad[0];
344 274
345 if (item->fill[1]) 275 if ((length > want) && EINA_DBL_EQ(weight[!horiz], 0))
346 y = cy + (ch - h) * 0.5 + item->pad[2]; 276 cur_pos += (length - want) * box_align[!horiz];
347 else 277
348 y = cy + (ch - h) * item->align[1] + item->pad[2]; 278 for (id = 0; id < count; id++)
349 }
350 else
351 { 279 {
352 // horizontally 280 item = &items[id];
353 if (item->max.w < INT_MAX) 281 item->space[horiz] = horiz ? boxs.h : boxs.w;
354 { 282 sw = item->space[0] - item->pad[0] - item->pad[1];
355 w = MIN(MAX(item->want.w - item->pad[0] - item->pad[1], item->max.w), cw); 283 sh = item->space[1] - item->pad[2] - item->pad[3];
356 x = cx + ((cw - w) * item->align[0]) + item->pad[0]; 284
357 } 285 if ((item->weight[0] > 0) && item->fill[0])
358 else if (item->fill[0]) 286 w = sw;
359 {
360 // fill x
361 w = cw - item->pad[0] - item->pad[1];
362 x = cx + item->pad[0];
363 }
364 else 287 else
365 { 288 w = 0;
366 if (horiz && item->weight[0] > 0)
367 w = cw - item->pad[0] - item->pad[1];
368 else
369 w = item->want.w - item->pad[0] - item->pad[1];
370 x = cx + ((cw - w) * item->align[0]) + item->pad[0];
371 }
372 289
373 // vertically 290 if ((item->weight[1] > 0) && item->fill[1])
374 if (item->max.h < INT_MAX) 291 h = sh;
375 { 292 else
376 h = MIN(MAX(item->want.h - item->pad[2] - item->pad[3], item->max.h), ch); 293 h = 0;
377 y = cy + ((ch - h) * item->align[1]) + item->pad[2]; 294
378 } 295 _min_max_calc(item, &w, &h, (item->aspect.w > 0) &&
379 else if (item->fill[1]) 296 (item->aspect.h > 0));
297 if (horiz)
380 { 298 {
381 // fill y 299 x = cur_pos + 0.5;
382 h = ch - item->pad[2] - item->pad[3]; 300 y = boxs.y;
383 y = cy + item->pad[2];
384 } 301 }
385 else 302 else
386 { 303 {
387 if (!horiz && item->weight[1] > 0) 304 x = boxs.x;
388 h = ch - item->pad[2] - item->pad[3]; 305 y = cur_pos + 0.5;
389 else
390 h = item->want.h - item->pad[2] - item->pad[3];
391 y = cy + ((ch - h) * item->align[1]) + item->pad[2];
392 } 306 }
307 x += item->pad[0] + ((sw - w) * item->align[0]);
308 y += item->pad[2] + ((sh - h) * item->align[1]);
309
310 cur_pos += item->space[!horiz] + pad;
311
312 efl_gfx_entity_geometry_set(item->obj, EINA_RECT(x, y, w, h));
393 } 313 }
314 }
394 315
395 //DBG("[%2d/%2d] cell: %.0f,%.0f %.0fx%.0f item: %.0f,%.0f %.0fx%.0f", 316 if (horiz)
396 // id, count, cx, cy, cw, ch, x, y, w, h); 317 {
397 evas_object_geometry_set(item->obj, x, y, w, h); 318 efl_gfx_size_hint_min_set(ui_box, EINA_SIZE2D(
319 wantw + boxl + boxr + pad * (count - 1),
320 wanth + boxt + boxb));
321 }
322 else
323 {
324 efl_gfx_size_hint_min_set(ui_box, EINA_SIZE2D(
325 wantw + boxl + boxr,
326 wanth + pad * (count - 1) + boxt + boxb));
398 } 327 }
399} 328}