naviframe: Fix to load default style if the given style does not exist
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Thu, 31 Aug 2017 07:21:08 +0000 (16:21 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Thu, 31 Aug 2017 07:30:28 +0000 (16:30 +0900)
Naviframe item theme name is combined with item style name and widget
style name.
Therefore, if the item theme name is not found, then "item/basic" item
style name should be loaded as a default item style name.

src/lib/elementary/elc_naviframe.c

index 93fd0fd..cd53e7a 100644 (file)
@@ -353,7 +353,15 @@ _item_style_set(Elm_Naviframe_Item_Data *it,
 
    if (!elm_layout_theme_set(VIEW(it), "naviframe", buf,
                              elm_widget_style_get(WIDGET(it))))
-     CRI("Failed to set layout!");
+     {
+        /* Naviframe item theme name is combined with item style name and widget
+         * style name.
+         * Therefore, if the item theme name is not found, then set "item/basic"
+         * item style name as a default item style name. */
+        if (!elm_layout_theme_set(VIEW(it), "naviframe", "item/basic",
+                                  elm_widget_style_get(WIDGET(it))))
+          CRI("Failed to set layout!");
+     }
 
    if (sd->freeze_events)
      evas_object_freeze_events_set(VIEW(it), EINA_FALSE);