summaryrefslogtreecommitdiff
path: root/src/lib/elm_toolbar.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-09-12 17:16:41 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-09-12 17:16:41 +0900
commit740cc0751807bb0c0bbb393d6e0d2e1588eb0678 (patch)
tree51d6465805e7b00cfb95a5cc7fd770037de609f6 /src/lib/elm_toolbar.c
parent254d513590f510a7443856ab7b9feb8aa6734054 (diff)
elm toolbar 0 size items fix if icon not found
this fixes a bug with horizontal style toolbar items and toolbar code itself simply emitting the wrong signals that causes 0 height items. this fixes T2710 @fix
Diffstat (limited to 'src/lib/elm_toolbar.c')
-rw-r--r--src/lib/elm_toolbar.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 4b3841e05..163bd314e 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -2402,14 +2402,29 @@ _item_new(Evas_Object *obj,
2402 evas_object_size_hint_max_set(it->icon, sd->icon_size, sd->icon_size); 2402 evas_object_size_hint_max_set(it->icon, sd->icon_size, sd->icon_size);
2403 elm_layout_content_set(VIEW(it), "elm.swallow.icon", it->icon); 2403 elm_layout_content_set(VIEW(it), "elm.swallow.icon", it->icon);
2404 elm_layout_signal_emit(VIEW(it), "elm,state,icon,visible", "elm"); 2404 elm_layout_signal_emit(VIEW(it), "elm,state,icon,visible", "elm");
2405 elm_layout_signal_emit(VIEW(it), "elm,icon,visible", "elm");
2405 evas_object_show(it->icon); 2406 evas_object_show(it->icon);
2406 elm_widget_sub_object_add(obj, it->icon); 2407 elm_widget_sub_object_add(obj, it->icon);
2407 } 2408 }
2409 else
2410 {
2411 elm_layout_signal_emit(VIEW(it), "elm,state,icon,hidden", "elm");
2412 elm_layout_signal_emit(VIEW(it), "elm,icon,hidden", "elm");
2413 }
2414
2408 if (it->label) 2415 if (it->label)
2409 { 2416 {
2410 elm_layout_text_set(VIEW(it), "elm.text", it->label); 2417 elm_layout_text_set(VIEW(it), "elm.text", it->label);
2411 elm_layout_signal_emit(VIEW(it), "elm,state,text,visible", "elm"); 2418 elm_layout_signal_emit(VIEW(it), "elm,state,text,visible", "elm");
2419 elm_layout_signal_emit(VIEW(it), "elm,text,visible", "elm");
2412 } 2420 }
2421 else
2422 {
2423 elm_layout_signal_emit(VIEW(it), "elm,state,text,hidden", "elm");
2424 elm_layout_signal_emit(VIEW(it), "elm,text,hidden", "elm");
2425 }
2426
2427 edje_object_message_signal_process(elm_layout_edje_get(VIEW(it)));
2413 2428
2414 evas_object_event_callback_add 2429 evas_object_event_callback_add
2415 (VIEW(it), EVAS_CALLBACK_RESIZE, _item_resize, obj); 2430 (VIEW(it), EVAS_CALLBACK_RESIZE, _item_resize, obj);