forked from enlightenment/efl
elm_theme: Fix to set default style group name correctly
"default" should not be appended to the group name in new EFL interface theme. e.g. "efl/button" Therefore, if "default" is given as a style name, then the style name should be converted to NULL for the group name in new EFL interface theme.
This commit is contained in:
parent
a2c8330d8f
commit
f66414beec
|
@ -329,6 +329,9 @@ _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *grou
|
||||||
|
|
||||||
if ((!clas) || !o) return EFL_UI_THEME_APPLY_FAILED;
|
if ((!clas) || !o) return EFL_UI_THEME_APPLY_FAILED;
|
||||||
if (!th) th = &(theme_default);
|
if (!th) th = &(theme_default);
|
||||||
|
|
||||||
|
if (eina_streq(style, "default")) style = NULL;
|
||||||
|
|
||||||
if (is_legacy)
|
if (is_legacy)
|
||||||
snprintf(buf2, sizeof(buf2), "elm/%s/%s/%s", clas, (group) ? group : "base", (style) ? style : "default");
|
snprintf(buf2, sizeof(buf2), "elm/%s/%s/%s", clas, (group) ? group : "base", (style) ? style : "default");
|
||||||
else
|
else
|
||||||
|
@ -356,10 +359,9 @@ _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *grou
|
||||||
if (!style)
|
if (!style)
|
||||||
return EFL_UI_THEME_APPLY_FAILED;
|
return EFL_UI_THEME_APPLY_FAILED;
|
||||||
|
|
||||||
if (eina_streq(style, "default")) return EFL_UI_THEME_APPLY_FAILED;
|
|
||||||
// Use the elementary default style.
|
// Use the elementary default style.
|
||||||
return (EFL_UI_THEME_APPLY_DEFAULT &
|
return (EFL_UI_THEME_APPLY_DEFAULT &
|
||||||
_elm_theme_set(th, o, clas, group, "default", is_legacy));
|
_elm_theme_set(th, o, clas, group, NULL, is_legacy));
|
||||||
}
|
}
|
||||||
|
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
|
|
Loading…
Reference in New Issue