summaryrefslogtreecommitdiff
path: root/src/lib/elm_toolbar.c
diff options
context:
space:
mode:
authortaehyub <taehyub.kim@samsung.com>2015-03-25 07:47:33 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-03-25 07:47:33 +0900
commit2304de9d22527f5cf060bd50c8856b34c6fcf588 (patch)
tree796407f02ab5b55545e5a2992706182048db6ba7 /src/lib/elm_toolbar.c
parent906b3361695ac81adcea977f7ee025f6ce906d3a (diff)
elm_toolbar: add toolbar item size calculation and setting min values for fixed items
Summary: In case of the toolbar item size is fixed, the size of toolbar item became finger size. so, after signal emission in _inform_item_number(), edje_object_size_min_restricted_calc() and evas_object_size_hint_min_set() function are added. Test Plan: change edc for supporting fixed toolbar item and run examples of toolbar in elementary_test Reviewers: woohyun, seoz, Hermet, raster Reviewed By: raster Differential Revision: https://phab.enlightenment.org/D2184
Diffstat (limited to 'src/lib/elm_toolbar.c')
-rw-r--r--src/lib/elm_toolbar.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index ad3b5c22d..e62276d39 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -1299,6 +1299,7 @@ _inform_item_number(Evas_Object *obj)
1299 char buf[sizeof("elm,number,item,") + 4]; 1299 char buf[sizeof("elm,number,item,") + 4];
1300 static int scount = 0; 1300 static int scount = 0;
1301 int count = 0; 1301 int count = 0;
1302 Evas_Coord mw, mh;
1302 1303
1303 EINA_INLIST_FOREACH(sd->items, it) 1304 EINA_INLIST_FOREACH(sd->items, it)
1304 { 1305 {
@@ -1313,7 +1314,16 @@ _inform_item_number(Evas_Object *obj)
1313 EINA_INLIST_FOREACH(sd->items, it) 1314 EINA_INLIST_FOREACH(sd->items, it)
1314 { 1315 {
1315 if (!it->separator && !it->object) 1316 if (!it->separator && !it->object)
1316 edje_object_signal_emit(VIEW(it), buf, "elm"); 1317 {
1318 edje_object_signal_emit(VIEW(it), buf, "elm");
1319 edje_object_message_signal_process(VIEW(it));
1320
1321 mw = mh = -1;
1322 elm_coords_finger_size_adjust(1, &mw, 1, &mh);
1323
1324 edje_object_size_min_restricted_calc(VIEW(it), &mw, &mh, mw, mh);
1325 evas_object_size_hint_min_set(VIEW(it), mw, mh);
1326 }
1317 } 1327 }
1318 } 1328 }
1319} 1329}