From 585444dec302540d29d3d41a475862c6e406ab4a Mon Sep 17 00:00:00 2001 From: Youngbok Shin Date: Fri, 28 Aug 2015 14:55:27 +0900 Subject: [PATCH] toolbar: Send a signal when item is resized. The view of item(edje) need to know when the item is resized. It fixes unnecessary text sliding issues. @tizen_fix Change-Id: Ia0209e730a90a04bc239b665977126ac12d3bca1 Signed-off-by: Youngbok Shin --- src/lib/elm_toolbar.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c index 2bea81a..7f9c6f1 100644 --- a/src/lib/elm_toolbar.c +++ b/src/lib/elm_toolbar.c @@ -2508,6 +2508,15 @@ _elm_toolbar_item_eo_base_constructor(Eo *eo_it, Elm_Toolbar_Item_Data *it) return eo_it; } +// TIZEN_ONLY(20150828): Send a signal when item is resized. +static void +_item_resized_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + elm_layout_signal_emit(obj, "elm,state,resized", "elm"); + edje_object_message_signal_process(elm_layout_edje_get(obj)); +} +// + static Elm_Toolbar_Item_Data * _item_new(Evas_Object *obj, const char *icon, @@ -2541,6 +2550,9 @@ _item_new(Evas_Object *obj, VIEW(it) = elm_layout_add(obj); evas_object_data_set(VIEW(it), "item", it); + // TIZEN_ONLY(20150828): Send a signal when item is resized. + evas_object_event_callback_add(VIEW(it), EVAS_CALLBACK_RESIZE, _item_resized_cb, NULL); + // if (_elm_config->atspi_mode) if (icon_obj) eo_do(icon_obj, elm_interface_atspi_accessible_parent_set(eo_it)); -- 2.7.4