Use elm_image_add instead of evas_object_image_filled_add. 89/76789/2
authorjuhee,park <juhee82.park@samsung.com>
Mon, 27 Jun 2016 08:32:23 +0000 (17:32 +0900)
committerjuhee park <juhee82.park@samsung.com>
Mon, 27 Jun 2016 08:36:26 +0000 (01:36 -0700)
(BG is not same with preview of wallpaper setting).
delete elm_ctxpopup_auto_hide_disabled_set.
(Menu will be close when user touch outside of the menu)

Change-Id: I991ea59aac921a0447d21d36c29d5ec713d70145
Signed-off-by: juhee,park <juhee82.park@samsung.com>
src/homescreen-efl.c
src/menu.c

index a58eebc..a66ba80 100755 (executable)
@@ -294,19 +294,22 @@ static void __homescreen_efl_set_wallpaper(void)
                main_info.bg = NULL;
        }
 
-       main_info.bg = evas_object_image_filled_add(evas_object_evas_get(main_info.main_layout));
+       main_info.bg = elm_image_add(main_info.main_layout);
+       elm_image_aspect_fixed_set(main_info.bg, EINA_TRUE);
+       elm_image_fill_outside_set(main_info.bg, EINA_TRUE);
+       elm_image_preload_disabled_set(main_info.bg, EINA_TRUE);
        evas_object_size_hint_min_set(main_info.bg, main_info.root_width, main_info.root_height);
        elm_object_part_content_set(main_info.main_layout, "home_bg", main_info.bg);
-       evas_object_show(main_info.bg);
 
-       const char *bg_path = util_get_res_file_path(IMAGE_DIR"/default_bg.png");
        ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, &buf);
        if (!buf || !ecore_file_can_read(buf) || ret != SYSTEM_SETTINGS_ERROR_NONE) {
-               evas_object_image_file_set(main_info.bg, bg_path, "bg");
+               elm_image_file_set(main_info.bg, util_get_res_file_path(IMAGE_DIR"/default_bg.png"), "bg");
        } else {
-               evas_object_image_file_set(main_info.bg, buf, "bg");
+               elm_image_file_set(main_info.bg, buf, "bg");
        }
 
+       evas_object_show(main_info.bg);
+
        if (buf) free(buf);
 }
 
index 436192b..2b2e6a1 100755 (executable)
@@ -58,7 +58,7 @@ void menu_show(Eina_Hash* hash_table)
        menu_info.menu = elm_ctxpopup_add(homescreen_efl_get_win());
        elm_object_style_set(menu_info.menu, "more/default");
        elm_ctxpopup_horizontal_set(menu_info.menu, EINA_FALSE);
-       elm_ctxpopup_auto_hide_disabled_set(menu_info.menu, EINA_TRUE);
+       //elm_ctxpopup_auto_hide_disabled_set(menu_info.menu, EINA_TRUE);
        elm_ctxpopup_direction_priority_set(menu_info.menu, ELM_CTXPOPUP_DIRECTION_DOWN, ELM_CTXPOPUP_DIRECTION_DOWN, ELM_CTXPOPUP_DIRECTION_DOWN, ELM_CTXPOPUP_DIRECTION_DOWN);
 
        evas_object_smart_callback_add(menu_info.menu, "dismissed", __menu_dismissed_cb, NULL);