From 7a50bab4a8d8f58243ea398cd8feb8c69d94927a Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 16 Oct 2020 16:33:12 +0900 Subject: [PATCH] Refactor code to add margin in common profile Change-Id: I79319435e863fc8cf71b6b9cf98b8d2bbb6d080a Signed-off-by: Jihoon Kim --- src/option.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/option.cpp b/src/option.cpp index cf53796..bb540f6 100644 --- a/src/option.cpp +++ b/src/option.cpp @@ -1128,9 +1128,6 @@ static Elm_Object_Item * append_item(Evas_Object *genlist, enum SETTING_ITEM_ID Evas_Object* create_option_main_view(Evas_Object *parent, Evas_Object *naviframe, SCLOptionWindowType type) { Evas_Object *genlist = NULL; -#ifdef _COMMON - Evas_Object *layout = NULL; -#endif if (CHECK_ARRAY_INDEX(type, OPTION_WINDOW_TYPE_MAX)) { create_genlist_item_classes(type); @@ -1146,11 +1143,6 @@ Evas_Object* create_option_main_view(Evas_Object *parent, Evas_Object *naviframe #ifdef _COMMON evas_object_smart_callback_add(genlist, "realized", _gl_realized_cb, NULL); - - layout = elm_layout_add(naviframe); - elm_layout_file_set(layout, OPTION_LAYOUT_EDJ, "main_layout"); - elm_object_content_set(layout, genlist); - evas_object_show(layout); #endif #ifdef _CIRCLE @@ -1266,11 +1258,7 @@ Evas_Object* create_option_main_view(Evas_Object *parent, Evas_Object *naviframe #endif } -#ifdef _COMMON - return layout; -#else return genlist; -#endif } static Evas_Object* create_option_language_view(Evas_Object *naviframe) @@ -1706,8 +1694,20 @@ option_window_created(Evas_Object *window, SCLOptionWindowType type) option_elements[type].back_button = naviframe_item_push(naviframe, OPTIONS, mlayout, NULL, NULL, navi_back_cb, NULL, EINA_FALSE); #else + Evas_Object *nf_content = NULL; Evas_Object *list = create_option_main_view(conformant, naviframe, type); - option_elements[type].back_button = naviframe_item_push(naviframe, OPTIONS, list, NULL, NULL, navi_back_cb, NULL); + nf_content = list; + +#ifdef _COMMON + Evas_Object *layout = elm_layout_add(naviframe); + elm_layout_file_set(layout, OPTION_LAYOUT_EDJ, "main_layout"); + elm_object_content_set(layout, list); + evas_object_show(layout); + + nf_content = layout; +#endif + + option_elements[type].back_button = naviframe_item_push(naviframe, OPTIONS, nf_content, NULL, NULL, navi_back_cb, NULL); elm_object_content_set(conformant, naviframe); #endif -- 2.7.4