From f66414beec74422d472dce85e97e8090cd129975 Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Fri, 9 Nov 2018 14:19:30 +0900 Subject: [PATCH] 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. --- src/lib/elementary/elm_theme.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_theme.c b/src/lib/elementary/elm_theme.c index a5b1ff4302..2bcedc9ddf 100644 --- a/src/lib/elementary/elm_theme.c +++ b/src/lib/elementary/elm_theme.c @@ -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 (!th) th = &(theme_default); + + if (eina_streq(style, "default")) style = NULL; + if (is_legacy) snprintf(buf2, sizeof(buf2), "elm/%s/%s/%s", clas, (group) ? group : "base", (style) ? style : "default"); else @@ -356,10 +359,9 @@ _elm_theme_set(Elm_Theme *th, Evas_Object *o, const char *clas, const char *grou if (!style) return EFL_UI_THEME_APPLY_FAILED; - if (eina_streq(style, "default")) return EFL_UI_THEME_APPLY_FAILED; // Use the elementary default style. 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