Window size is not overflowed more than the root window size.
authorJin Yoon <jinny.yoon@samsung.com>
Thu, 13 Dec 2012 06:31:06 +0000 (15:31 +0900)
committerJin Yoon <jinny.yoon@samsung.com>
Thu, 13 Dec 2012 06:31:06 +0000 (15:31 +0900)
Change-Id: I7a677a35967c369eaf8cf5fcae68a9d9c2bd9925

include/conf.h
src/all_apps/layout.c
src/layout.c
src/menu_screen.c

index 0df39be66947594923e1acbf49c74723fe18ec0d..bde663e1e510ae277fba82ec45a883c53962f8bd 100644 (file)
@@ -25,6 +25,7 @@
 #define BASE_WIDTH 720.0f
 
 #define PAGE_PORTRAIT_HEIGHT 1060.0f
+#define INDEX_HEIGHT 70
 
 #endif // _MENU_SCREEN_CONF_H_
 
index 61d39dbbf38eaff9184721ab4066c820cf960186..7d394ea2e1cb867e7c2cba001892766be02b8ca3 100644 (file)
@@ -121,8 +121,10 @@ Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate)
        all_apps_edje = ALL_APPS_EDJE_PORTRAIT;
        page_edje = GROUP_4X4_EDJE_PORTRAIT;
        width = menu_screen_get_root_width();
-       height = menu_screen_get_root_height();
-       item_width = width / 4.0f;
+       height = menu_screen_get_root_height() - INDEX_HEIGHT;
+
+       if (menu_screen_get_root_width() > menu_screen_get_root_height()) item_width = height / 5.0f;
+       else item_width = width / 4.0f;
 
        if (EINA_FALSE == elm_layout_file_set(all_apps, all_apps_edje, ALL_APPS_GROUP)) {
                evas_object_del(all_apps);
index b56b477c49fa62e96a2473ff11820592c923cfb1..f28751b8615f2779c6d5d487e4d082a5ece8a3ca 100644 (file)
@@ -45,7 +45,7 @@ Evas_Object *layout_create(Evas_Object *conformant, const char *file, const char
                retv_if(NULL == layout, NULL);
 
                width = menu_screen_get_root_width();
-               height = menu_screen_get_root_height();
+               height = menu_screen_get_root_height() - INDEX_HEIGHT;
 
                evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
                evas_object_size_hint_min_set(layout, width, height);
index d2dc8d3bb24c3031514f9f9fd4c35d979f6bc089..acd66504c5a2f41da3f9539177310e39e1a74f6b 100644 (file)
@@ -143,7 +143,6 @@ static menu_screen_error_e _create_canvas(char *name, char *title)
                _E("[%s] Failed to get ecore_evas object", __func__);
        }
 
-       evas_object_move(menu_screen_info.win, 0, 0);
        evas_object_size_hint_min_set(menu_screen_info.win, menu_screen_info.root_width, menu_screen_info.root_height);
        evas_object_size_hint_max_set(menu_screen_info.win, menu_screen_info.root_width, menu_screen_info.root_height);
        evas_object_resize(menu_screen_info.win, menu_screen_info.root_width, menu_screen_info.root_height);