summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elc_multibuttonentry.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elc_multibuttonentry.c')
-rw-r--r--src/lib/elementary/elc_multibuttonentry.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/lib/elementary/elc_multibuttonentry.c b/src/lib/elementary/elc_multibuttonentry.c
index 580d1c1..6e9cb56 100644
--- a/src/lib/elementary/elc_multibuttonentry.c
+++ b/src/lib/elementary/elc_multibuttonentry.c
@@ -186,7 +186,7 @@ _shrink_mode_set(Evas_Object *obj,
186 186
187 if (shrink == EINA_TRUE) 187 if (shrink == EINA_TRUE)
188 { 188 {
189 Evas_Coord w = 0, w_tmp = 0; 189 Evas_Coord w = 0;
190 Evas_Coord box_inner_item_width_padding = 0; 190 Evas_Coord box_inner_item_width_padding = 0;
191 191
192 elm_box_padding_get(sd->box, &box_inner_item_width_padding, NULL); 192 elm_box_padding_get(sd->box, &box_inner_item_width_padding, NULL);
@@ -204,8 +204,7 @@ _shrink_mode_set(Evas_Object *obj,
204 if (sd->label && sd->label_packed) 204 if (sd->label && sd->label_packed)
205 { 205 {
206 elm_box_pack_end(sd->box, sd->label); 206 elm_box_pack_end(sd->box, sd->label);
207 efl_gfx_size_hint_combined_min_get(sd->label, &w_tmp, NULL); 207 w -= efl_gfx_size_hint_combined_min_get(sd->label).w;
208 w -= w_tmp;
209 w -= box_inner_item_width_padding; 208 w -= box_inner_item_width_padding;
210 } 209 }
211 210
@@ -214,7 +213,7 @@ _shrink_mode_set(Evas_Object *obj,
214 213
215 EINA_LIST_FOREACH(sd->items, l, eo_item) 214 EINA_LIST_FOREACH(sd->items, l, eo_item)
216 { 215 {
217 Evas_Coord item_w, w_label_count = 0, h = 0; 216 Evas_Coord w_label_count = 0, h = 0;
218 char *buf; 217 char *buf;
219 218
220 ELM_MULTIBUTTONENTRY_ITEM_DATA_GET(eo_item, item); 219 ELM_MULTIBUTTONENTRY_ITEM_DATA_GET(eo_item, item);
@@ -222,9 +221,7 @@ _shrink_mode_set(Evas_Object *obj,
222 evas_object_show(VIEW(item)); 221 evas_object_show(VIEW(item));
223 item->visible = EINA_TRUE; 222 item->visible = EINA_TRUE;
224 223
225 efl_gfx_size_hint_combined_min_get(VIEW(item), &item_w, NULL); 224 w -= efl_gfx_size_hint_combined_min_get(VIEW(item)).w;
226
227 w -= item_w;
228 w -= box_inner_item_width_padding; 225 w -= box_inner_item_width_padding;
229 count--; 226 count--;
230 227
@@ -328,7 +325,7 @@ _view_update(Elm_Multibuttonentry_Data *sd)
328 325
329 // update label 326 // update label
330 if (sd->label) 327 if (sd->label)
331 efl_gfx_size_hint_combined_min_get(sd->label, &width, &height); 328 evas_object_size_hint_combined_min_get(sd->label, &width, &height);
332 329
333 if (sd->guide_text) 330 if (sd->guide_text)
334 { 331 {
@@ -829,7 +826,7 @@ _item_new(Elm_Multibuttonentry_Data *sd,
829 evas_object_show(VIEW(item)); 826 evas_object_show(VIEW(item));
830 827
831 evas_object_smart_calculate(VIEW(item)); 828 evas_object_smart_calculate(VIEW(item));
832 efl_gfx_size_hint_combined_min_get(VIEW(item), &minw, &minh); 829 evas_object_size_hint_combined_min_get(VIEW(item), &minw, &minh);
833 evas_object_geometry_get(sd->box, NULL, NULL, &boxw, NULL); 830 evas_object_geometry_get(sd->box, NULL, NULL, &boxw, NULL);
834 831
835 if (sd->w_box && minw > boxw) 832 if (sd->w_box && minw > boxw)
@@ -1053,7 +1050,7 @@ _box_resize_cb(void *data,
1053 elm_layout_sizing_eval(VIEW(it)); 1050 elm_layout_sizing_eval(VIEW(it));
1054 evas_object_smart_calculate(VIEW(it)); 1051 evas_object_smart_calculate(VIEW(it));
1055 1052
1056 efl_gfx_size_hint_combined_min_get(VIEW(it), &mnw, &mnh); 1053 evas_object_size_hint_combined_min_get(VIEW(it), &mnw, &mnh);
1057 1054
1058 if (mnw > w - hpad) 1055 if (mnw > w - hpad)
1059 { 1056 {
@@ -1328,14 +1325,14 @@ _box_min_size_calculate(Evas_Object *box,
1328 Evas_Object_Box_Option *opt; 1325 Evas_Object_Box_Option *opt;
1329 1326
1330 evas_object_geometry_get(box, NULL, NULL, &w, NULL); 1327 evas_object_geometry_get(box, NULL, NULL, &w, NULL);
1331 efl_gfx_size_hint_combined_min_get(box, &minw, NULL); 1328 evas_object_size_hint_combined_min_get(box, &minw, NULL);
1332 1329
1333 if (!w) return EINA_FALSE; 1330 if (!w) return EINA_FALSE;
1334 1331
1335 line_num = 1; 1332 line_num = 1;
1336 EINA_LIST_FOREACH(priv->children, l, opt) 1333 EINA_LIST_FOREACH(priv->children, l, opt)
1337 { 1334 {
1338 efl_gfx_size_hint_combined_min_get(opt->obj, &mnw, &mnh); 1335 evas_object_size_hint_combined_min_get(opt->obj, &mnw, &mnh);
1339 1336
1340 linew += mnw; 1337 linew += mnw;
1341 if (lineh < mnh) lineh = mnh; 1338 if (lineh < mnh) lineh = mnh;
@@ -1374,7 +1371,7 @@ _box_layout_cb(Evas_Object *o,
1374 1371
1375 evas_object_geometry_get(o, &x, &y, &w, &h); 1372 evas_object_geometry_get(o, &x, &y, &w, &h);
1376 1373
1377 efl_gfx_size_hint_combined_min_get(o, &minw, &minh); 1374 evas_object_size_hint_combined_min_get(o, &minw, &minh);
1378 evas_object_size_hint_align_get(o, &ax, &ay); 1375 evas_object_size_hint_align_get(o, &ax, &ay);
1379 1376
1380 rtl = efl_ui_mirrored_get(data); 1377 rtl = efl_ui_mirrored_get(data);
@@ -1404,7 +1401,7 @@ _box_layout_cb(Evas_Object *o,
1404 obj = opt->obj; 1401 obj = opt->obj;
1405 evas_object_size_hint_align_get(obj, &ax, &ay); 1402 evas_object_size_hint_align_get(obj, &ax, &ay);
1406 evas_object_size_hint_weight_get(obj, &wx, &wy); 1403 evas_object_size_hint_weight_get(obj, &wx, &wy);
1407 efl_gfx_size_hint_combined_min_get(obj, &mnw, &mnh); 1404 evas_object_size_hint_combined_min_get(obj, &mnw, &mnh);
1408 1405
1409 fw = fh = EINA_FALSE; 1406 fw = fh = EINA_FALSE;
1410 if (EINA_DBL_EQ(ax, -1)) {fw = 1; ax = 0.5; } 1407 if (EINA_DBL_EQ(ax, -1)) {fw = 1; ax = 0.5; }