raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=906b3361695ac81adcea977f7ee025f6ce906d3a
commit 906b3361695ac81adcea977f7ee025f6ce906d3a Author: Amitesh Singh <amitesh...@samsung.com> Date: Wed Mar 25 07:23:07 2015 +0900 tooltip: Corrected namespacing for tooltip label style. Summary: namespacing is wrong for tooltip label. Although we still support old theme but it should be removed in EFL 2.0. Test Plan: elementary_test -to tooltip Reviewers: seoz, Hermet, raster Reviewed By: raster Subscribers: kimcinoo, sachin.dev, seoz Differential Revision: https://phab.enlightenment.org/D2120 --- data/themes/edc/elm/tooltip.edc | 4 +++- src/lib/els_tooltip.c | 23 +++++++++++++++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/data/themes/edc/elm/tooltip.edc b/data/themes/edc/elm/tooltip.edc index 4094b20..f84e076 100644 --- a/data/themes/edc/elm/tooltip.edc +++ b/data/themes/edc/elm/tooltip.edc @@ -1,4 +1,6 @@ -group { name: "elm/label/base/tooltip"; +group { name: "elm/label/base/tooltip/default"; + alias: "elm/label/base/tooltip"; //XXX: Remove it in EFL 2.0 + alias: "elm/label/base/tooltip/transparent"; styles { style { name: "tooltip_style"; base: "font="FN" font_size=10 color=#ffffff style=shadow,bottom shadow_color=#00000080 wrap=word text_class=bubble"; diff --git a/src/lib/els_tooltip.c b/src/lib/els_tooltip.c index 6bf2b6d..811c698 100644 --- a/src/lib/els_tooltip.c +++ b/src/lib/els_tooltip.c @@ -730,25 +730,40 @@ _elm_tooltip_obj_free_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, voi _elm_tooltip_unset(tt); } +static void +_tooltip_label_style_set(Evas_Object *obj, Evas_Object *label) +{ + ELM_TOOLTIP_GET_OR_RETURN(tt, obj); + char buf[100] = {0}; + + sprintf(buf, "tooltip/%s", tt->style); + if (!elm_object_style_set(label, buf)) + { + WRN("Failed to set tooltip label style: %s, reverting to old style", + buf); + elm_object_style_set(label, "tooltip"); //XXX: remove it in EFL 2.0 + } +} + static Evas_Object * -_elm_tooltip_label_create(void *data, Evas_Object *obj EINA_UNUSED, Evas_Object *tooltip) +_elm_tooltip_label_create(void *data, Evas_Object *obj, Evas_Object *tooltip) { Evas_Object *label = elm_label_add(tooltip); if (!label) return NULL; - elm_object_style_set(label, "tooltip"); + _tooltip_label_style_set(obj, label); elm_object_text_set(label, data); return label; } static Evas_Object * -_elm_tooltip_trans_label_create(void *data, Evas_Object *obj EINA_UNUSED, Evas_Object *tooltip) +_elm_tooltip_trans_label_create(void *data, Evas_Object *obj, Evas_Object *tooltip) { Evas_Object *label = elm_label_add(tooltip); const char **text = data; if (!label) return NULL; - elm_object_style_set(label, "tooltip"); + _tooltip_label_style_set(obj, label); elm_object_domain_translatable_text_set(label, text[0], text[1]); return label; } --