-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";
_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;
}