naviframe: Fix to load default style if the given style does not exist 34/146934/1
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:34:19 +0000 (16:34 +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.

Change-Id: I16d788ef41f2bd9668b50adf59175802dd715872

src/lib/elc_naviframe.c

index 4124ba5..bff2c61 100644 (file)
@@ -409,7 +409,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);