From 4504ffd5215f05583ff5c348963a14b9ceb8a57a Mon Sep 17 00:00:00 2001 From: Jin Yoon Date: Tue, 14 May 2013 15:58:13 +0900 Subject: [PATCH] Icon size : 108 -> 117 --- data/edje/all_apps_portrait.edc | 8 +-- data/edje/conf.edc | 1 + data/edje/group_4x4_portrait.edc | 97 ++++++++++++++++++++++-------------- data/edje/item_4x4.edc | 45 +++++++---------- data/org.tizen.menu-screen.xml.in | 2 +- include/all_apps/layout.h | 2 +- include/conf.h | 5 ++ packaging/org.tizen.menu-screen.spec | 11 ++-- src/all_apps/layout.c | 8 +-- src/menu_screen.c | 4 +- src/popup.c | 2 +- 11 files changed, 104 insertions(+), 81 deletions(-) create mode 120000 data/edje/conf.edc diff --git a/data/edje/all_apps_portrait.edc b/data/edje/all_apps_portrait.edc index 4e1bbd6..ac04d72 100644 --- a/data/edje/all_apps_portrait.edc +++ b/data/edje/all_apps_portrait.edc @@ -40,8 +40,8 @@ collections { mouse_events: 0; description { state: "default" 0.0; - rel1 { relative: 0.0 0/1210; to, "bg";} // 1280 - 70(indicator) - rel2 { relative: 1.0 104/1210; to, "bg";} // 174 - 70 + rel1 { relative: 0.0 20/1210; to, "bg";} // 1280 - 70(indicator) + rel2 { relative: 1.0 124/1210; to, "bg";} // 174 - 70 color: 0 0 0 255; visible: 0; } @@ -78,8 +78,8 @@ collections { mouse_events: 1; description { state: "default" 0.0; - rel1 { relative: 0.0 84/1210; to, "bg"; } // 154 - 70 - rel2 { relative: 1.0 1144/1210; to, "bg"; } + rel1 { relative: 0.0 134/1210; to, "bg"; } // 154 - 70 + rel2 { relative: 1.0 1194/1210; to, "bg"; } color: 34 34 34 255; visible: 0; } diff --git a/data/edje/conf.edc b/data/edje/conf.edc new file mode 120000 index 0000000..de97229 --- /dev/null +++ b/data/edje/conf.edc @@ -0,0 +1 @@ +../../include/conf.h \ No newline at end of file diff --git a/data/edje/group_4x4_portrait.edc b/data/edje/group_4x4_portrait.edc index 4aa4c5e..de78a2a 100644 --- a/data/edje/group_4x4_portrait.edc +++ b/data/edje/group_4x4_portrait.edc @@ -16,7 +16,7 @@ -#define MENU(part_name, p_relx, p_rely, relx, rely, n_relx, n_rely, ratio) \ +#define MENU(part_name, p_relx, p_rely, relx, rely, n_relx, n_rely) \ part { \ name: "menu_swallow_"part_name; \ type: SWALLOW; \ @@ -26,27 +26,27 @@ state: "default" 0.0; \ visible: 1; \ fixed: 1 1; \ - rel1 { relative: (relx)+(ratio) (rely)+(ratio); to, "bg"; } \ - rel2 { relative: (relx)+(ratio) (rely)+(ratio); to, "bg"; } \ + rel1 { relative: (relx) (rely); to, "bg"; } \ + rel2 { relative: (relx) (rely); to, "bg"; } \ } \ description { \ state: "prev" 0.0; \ inherit: "default" 0.0; \ - rel1.relative: (p_relx)+(ratio) (p_rely)+(ratio); \ - rel2.relative: (p_relx)+(ratio) (p_rely)+(ratio); \ + rel1.relative: (p_relx) (p_rely); \ + rel2.relative: (p_relx) (p_rely); \ } \ description { \ state: "next" 0.0; \ inherit: "default" 0.0; \ - rel1.relative: (n_relx)+(ratio) (n_rely)+(ratio); \ - rel2.relative: (n_relx)+(ratio) (n_rely)+(ratio); \ + rel1.relative: (n_relx) (n_rely); \ + rel2.relative: (n_relx) (n_rely); \ } \ description { \ state: "invisible" 0.0; \ inherit: "default" 0.0; \ visible: 0; \ - rel1.relative: (n_relx)+(ratio) (n_rely)+(ratio); \ - rel2.relative: (n_relx)+(ratio) (n_rely)+(ratio); \ + rel1.relative: (n_relx) (n_rely); \ + rel2.relative: (n_relx) (n_rely); \ } \ } \ @@ -81,6 +81,41 @@ target: "menu_swallow_"part_name; \ } +#define ITEM_00_X (1.0/8.0) +#define ITEM_00_Y (1.0/8.0) +#define ITEM_01_X (3.0/8.0) +#define ITEM_01_Y ITEM_00_Y +#define ITEM_02_X (5.0/8.0) +#define ITEM_02_Y ITEM_00_Y +#define ITEM_03_X (7.0/8.0) +#define ITEM_03_Y ITEM_00_Y + +#define ITEM_04_X ITEM_00_X +#define ITEM_04_Y (3.0/8.0) +#define ITEM_05_X ITEM_01_X +#define ITEM_05_Y ITEM_04_Y +#define ITEM_06_X ITEM_02_X +#define ITEM_06_Y ITEM_04_Y +#define ITEM_07_X ITEM_03_X +#define ITEM_07_Y ITEM_04_Y + +#define ITEM_08_X ITEM_00_X +#define ITEM_08_Y (5.0/8.0) +#define ITEM_09_X ITEM_01_X +#define ITEM_09_Y ITEM_08_Y +#define ITEM_10_X ITEM_02_X +#define ITEM_10_Y ITEM_08_Y +#define ITEM_11_X ITEM_03_X +#define ITEM_11_Y ITEM_08_Y + +#define ITEM_12_X ITEM_00_X +#define ITEM_12_Y (7.0/8.0) +#define ITEM_13_X ITEM_01_X +#define ITEM_13_Y ITEM_12_Y +#define ITEM_14_X ITEM_02_X +#define ITEM_14_Y ITEM_12_Y +#define ITEM_15_X ITEM_03_X +#define ITEM_15_Y ITEM_12_Y collections { group { @@ -97,30 +132,22 @@ collections { } } - MENU("0", -0.25, 0.0, 0.0, 0.0, 0.25, 0.0, 0.125) - MENU("1", 0.0, 0.0, 0.25, 0.0, 0.50, 0.0, 0.125) - MENU("2", 0.25, 0.0, 0.50, 0.0, 0.75, 0.0, 0.125) - MENU("3", 0.50, 0.0, 0.75, 0.0, 0.0, 0.20, 0.125) - - MENU("4", 0.75, 0.0, 0.0, 0.20, 0.25, 0.20, 0.125) - MENU("5", 0.0, 0.20, 0.25, 0.20, 0.50, 0.20, 0.125) - MENU("6", 0.25, 0.20, 0.50, 0.20, 0.75, 0.20, 0.125) - MENU("7", 0.50, 0.20, 0.75, 0.20, 0.0, 0.40, 0.125) - - MENU("8", 0.75, 0.20, 0.0, 0.40, 0.25, 0.40, 0.125) - MENU("9", 0.0, 0.40, 0.25, 0.40, 0.50, 0.40, 0.125) - MENU("10", 0.25, 0.40, 0.50, 0.40, 0.75, 0.40, 0.125) - MENU("11", 0.50, 0.40, 0.75, 0.40, 0.0, 0.60, 0.125) - - MENU("12", 0.75, 0.40, 0.0, 0.60, 0.25, 0.60, 0.125) - MENU("13", 0.0, 0.60, 0.25, 0.60, 0.50, 0.60, 0.125) - MENU("14", 0.25, 0.60, 0.50, 0.60, 0.75, 0.60, 0.125) - MENU("15", 0.50, 0.60, 0.75, 0.60, 1.0, 0.80, 0.125) - - MENU("16", 0.75, 0.60, 0.0, 0.80, 0.25, 0.80, 0.125) - MENU("17", 0.0, 0.80, 0.25, 0.80, 0.50, 0.80, 0.125) - MENU("18", 0.25, 0.80, 0.50, 0.80, 0.75, 0.80, 0.125) - MENU("19", 0.50, 0.80, 0.75, 0.80, 1.0, 0.80, 0.125) + MENU("0", ITEM_00_X, ITEM_00_Y, ITEM_00_X, ITEM_00_Y, ITEM_01_X, ITEM_01_Y) + MENU("1", ITEM_00_X, ITEM_00_Y, ITEM_01_X, ITEM_01_Y, ITEM_02_X, ITEM_02_Y) + MENU("2", ITEM_01_X, ITEM_01_Y, ITEM_02_X, ITEM_02_Y, ITEM_03_X, ITEM_03_Y) + MENU("3", ITEM_02_X, ITEM_02_Y, ITEM_03_X, ITEM_03_Y, ITEM_04_X, ITEM_04_Y) + MENU("4", ITEM_03_X, ITEM_03_Y, ITEM_04_X, ITEM_04_Y, ITEM_05_X, ITEM_05_Y) + MENU("5", ITEM_04_X, ITEM_04_Y, ITEM_05_X, ITEM_05_Y, ITEM_06_X, ITEM_06_Y) + MENU("6", ITEM_05_X, ITEM_05_Y, ITEM_06_X, ITEM_06_Y, ITEM_07_X, ITEM_07_Y) + MENU("7", ITEM_06_X, ITEM_06_Y, ITEM_07_X, ITEM_07_Y, ITEM_08_X, ITEM_08_Y) + MENU("8", ITEM_07_X, ITEM_07_Y, ITEM_08_X, ITEM_08_Y, ITEM_09_X, ITEM_09_Y) + MENU("9", ITEM_08_X, ITEM_08_Y, ITEM_09_X, ITEM_09_Y, ITEM_10_X, ITEM_10_Y) + MENU("10", ITEM_09_X, ITEM_09_Y, ITEM_10_X, ITEM_10_Y, ITEM_11_X, ITEM_11_Y) + MENU("11", ITEM_10_X, ITEM_10_Y, ITEM_11_X, ITEM_11_Y, ITEM_12_X, ITEM_12_Y) + MENU("12", ITEM_11_X, ITEM_11_Y, ITEM_12_X, ITEM_12_Y, ITEM_13_X, ITEM_13_Y) + MENU("13", ITEM_12_X, ITEM_12_Y, ITEM_13_X, ITEM_13_Y, ITEM_14_X, ITEM_14_Y) + MENU("14", ITEM_13_X, ITEM_13_Y, ITEM_14_X, ITEM_14_Y, ITEM_15_X, ITEM_15_Y) + MENU("15", ITEM_14_X, ITEM_14_Y, ITEM_15_X, ITEM_15_Y, ITEM_15_X, ITEM_15_Y) part { name: "dim"; @@ -159,10 +186,6 @@ collections { MENU_PROGRAM("13") MENU_PROGRAM("14") MENU_PROGRAM("15") - MENU_PROGRAM("16") - MENU_PROGRAM("17") - MENU_PROGRAM("18") - MENU_PROGRAM("19") program { name: "dim,on"; diff --git a/data/edje/item_4x4.edc b/data/edje/item_4x4.edc index 8a24a61..2d5f235 100644 --- a/data/edje/item_4x4.edc +++ b/data/edje/item_4x4.edc @@ -16,6 +16,10 @@ +#include "conf.edc" + + + styles { style { name: "app_name_style"; @@ -48,19 +52,6 @@ collections { color: 0 0 0 0; } } - - part { - name: "icon_bg"; - type: RECT; - scale: 1; - mouse_events: 1; - description { - state: "default" 0.0; - rel1 { relative: 36/180 7/180; to, "bg"; } - rel2 { relative: 144/180 115/180; to, "bg"; } - color: 0 0 0 0; - } - } part { name: "icon_image"; type: SWALLOW; @@ -68,8 +59,10 @@ collections { mouse_events: 1; description { state: "default" 0.0; - rel1 { relative: 0.0 0.0; to, "icon_bg"; } - rel2 { relative: 1.0 1.0; to, "icon_bg"; } + rel1 { relative: 0.5 54/ITEM_HEIGHT; } + rel2 { relative: 0.5 54/ITEM_HEIGHT; } + min: 117 117; + fixed: 1 1; } } part { @@ -79,8 +72,8 @@ collections { mouse_events: 1; description { state: "default" 0.0; - rel1 { relative: 15/180 7/180; to, "bg"; } - rel2 { relative: 165/180 160/180; to, "bg"; } + rel1 { relative: 0.0 0.0; to, "icon_image"; } + rel2 { relative: 1.0 1.0; to, "txt"; } color: 0 0 0 0; visible: 1; } @@ -93,8 +86,8 @@ collections { description { state: "default" 0.0; visible: 0; - rel1 { relative: 120/180 10/180; to, "bg"; } - rel2 { relative: 180/180 70/180; to, "bg"; } + rel1 { relative: 110/ITEM_WIDTH 0.0; to, "bg"; } + rel2 { relative: 170/ITEM_WIDTH 60/ITEM_HEIGHT; to, "bg"; } image { normal: "../images/menu_badge_01.png"; } @@ -160,8 +153,8 @@ collections { mouse_events: 1; description { state: "default" 0.0; - rel1 { relative: 10/180 10/180; to, "bg"; } - rel2 { relative: 70/180 70/180; to, "bg"; } + rel1 { relative: 10/ITEM_WIDTH 0.0; to, "bg"; } + rel2 { relative: 70/ITEM_WIDTH 60/ITEM_HEIGHT; to, "bg"; } image { normal: "../images/RM06_App tray_Btn_Uninstall.png"; } @@ -188,8 +181,8 @@ collections { mouse_events: 1; description { state: "default" 0.0; - rel1 { relative: 0/180 10/180; to, "bg"; } - rel2 { relative: 60/180 70/180; to, "bg"; } + rel1 { relative: -0.2 -0.2; to, "uninstall"; } + rel2 { relative: 1.2 1.2; to, "uninstall"; } color: 0 0 0 0; visible: 0; } @@ -208,9 +201,9 @@ collections { description { state: "default" 0.0; - rel1 { relative: 0.0 114/180; to, "bg"; } - rel2 { relative: 1.0 175/180; to, "bg"; } - align: 0.5 0.5; + rel1 { relative: 0.0 1.0; to_x, "bg"; to_y, "icon_image"; } + rel2 { relative: 1.0 1.0; to, "bg"; } + align: 0.5 0.0; color: 255 255 255 255; color2: 0 0 0 35; color3: 0 0 0 35; diff --git a/data/org.tizen.menu-screen.xml.in b/data/org.tizen.menu-screen.xml.in index 3ced22c..20329bc 100755 --- a/data/org.tizen.menu-screen.xml.in +++ b/data/org.tizen.menu-screen.xml.in @@ -1,5 +1,5 @@ - + Jin Yoon Youngjoo Park diff --git a/include/all_apps/layout.h b/include/all_apps/layout.h index f0c5e5b..258e936 100644 --- a/include/all_apps/layout.h +++ b/include/all_apps/layout.h @@ -21,7 +21,7 @@ #include -#define PAGE_MAX_APP 20 +#define PAGE_MAX_APP 16 extern Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate); extern void all_apps_layout_destroy(Evas_Object *all_apps); diff --git a/include/conf.h b/include/conf.h index abd12e2..7a4da32 100644 --- a/include/conf.h +++ b/include/conf.h @@ -27,6 +27,11 @@ #define PAGE_PORTRAIT_HEIGHT 1060.0f #define INDEX_HEIGHT 70 +#define ITEM_WIDTH 180.0 +#define ITEM_WIDTH_PROP (ITEM_WIDTH/BASE_WIDTH) +#define ITEM_HEIGHT 198.0 +#define ITEM_HEIGHT_PROP (ITEM_HEIGHT/BASE_HEIGHT) + #endif // _MENU_SCREEN_CONF_H_ // End of a file diff --git a/packaging/org.tizen.menu-screen.spec b/packaging/org.tizen.menu-screen.spec index 8e41486..47398e8 100644 --- a/packaging/org.tizen.menu-screen.spec +++ b/packaging/org.tizen.menu-screen.spec @@ -16,7 +16,7 @@ Name: org.tizen.menu-screen Summary: An utility library of the menu screen -Version: 1.0.41 +Version: 1.1.0 Release: 1.1 Group: TO_BE/FILLED_IN License: Flora Software License @@ -113,9 +113,10 @@ sqlite3 %{_datadir}/dbspace/.menu_screen.db 'PRAGMA journal_mode = PERSIST; ); ' -chown -R 5000:5000 %{_datadir} -chown root:5000 %{_datadir}/dbspace/.menu_screen.db -chown root:5000 %{_datadir}/dbspace/.menu_screen.db-journal +INHOUSE_ID="5000" +chown -R $INHOUSE_ID:$INHOUSE_ID %{_datadir} +chown root:$INHOUSE_ID %{_datadir}/dbspace/.menu_screen.db +chown root:$INHOUSE_ID %{_datadir}/dbspace/.menu_screen.db-journal chmod 660 %{_datadir}/dbspace/.menu_screen.db chmod 660 %{_datadir}/dbspace/.menu_screen.db-journal @@ -136,7 +137,7 @@ fi %{_resdir}/edje/layout_portrait.edj %{_resdir}/edje/index.edj %{_resdir}/images/default.png -%{_localedir}/* +%{_localedir}/*/*/*.mo %{_usr_datadir}/packages/org.tizen.menu-screen.xml %{_usr_datadir}/license/%{name} /opt/etc/smack/accesses.d/%{_package_name}.rule diff --git a/src/all_apps/layout.c b/src/all_apps/layout.c index 140afd7..dc1620a 100644 --- a/src/all_apps/layout.c +++ b/src/all_apps/layout.c @@ -283,7 +283,7 @@ HAPI Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate) static const char item_edje[] = EDJEDIR"/item_4x4.edj"; static const char *page_edje; static const char *all_apps_edje; - int item_width; + int item_width, item_height; int width; int height; @@ -295,8 +295,8 @@ HAPI Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate) width = menu_screen_get_root_width(); 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; + item_width = ITEM_WIDTH_PROP * menu_screen_get_root_width(); + item_height = ITEM_HEIGHT_PROP * menu_screen_get_root_height(); if (EINA_FALSE == elm_layout_file_set(all_apps, all_apps_edje, ALL_APPS_GROUP)) { evas_object_del(all_apps); @@ -311,7 +311,7 @@ HAPI Evas_Object *all_apps_layout_create(Evas_Object *controlbar, int rotate) evas_object_data_set(all_apps, "page_max_app", (void *) PAGE_MAX_APP); evas_object_data_set(all_apps, "item_edje", (void *) item_edje); evas_object_data_set(all_apps, "item_width", (void *) item_width); - evas_object_data_set(all_apps, "item_height", (void *) item_width); + evas_object_data_set(all_apps, "item_height", (void *) item_height); evas_object_data_set(all_apps, "item_enable_long_press", (void *) true); evas_object_data_set(all_apps, "item_text_dual_line", (void *) true); evas_object_data_set(all_apps, "is_under_pkgmgr", (void *) true); diff --git a/src/menu_screen.c b/src/menu_screen.c index 8a92013..baeabc0 100644 --- a/src/menu_screen.c +++ b/src/menu_screen.c @@ -331,7 +331,6 @@ static void _destroy_conformant(Evas_Object *conformant) static bool _create_cb(void *data) { Evas_Object *conformant; - Evas_Object *layout; _get_window_size(); _init_theme(); @@ -347,6 +346,7 @@ static bool _create_cb(void *data) retv_if(NULL == conformant, false); evas_object_data_set(menu_screen_info.win, "conformant", conformant); + Evas_Object *layout; layout = layout_create(conformant, LAYOUT_EDJE_PORTRAIT, LAYOUT_GROUP_NAME, MENU_SCREEN_ROTATE_PORTRAIT); if (NULL == layout) { @@ -371,7 +371,7 @@ static void _terminate_cb(void *data) Evas_Object *layout; if (vconf_ignore_key_changed(VCONFKEY_BGSET, _change_bg_cb) < 0) { - _E("Failed to remove bgset %s\n", VCONFKEY_BGSET); + _E("Failed to remove bgset [%s]\n", VCONFKEY_BGSET); } evas_object_hide(menu_screen_info.win); diff --git a/src/popup.c b/src/popup.c index c6b1519..60d5fa5 100644 --- a/src/popup.c +++ b/src/popup.c @@ -155,7 +155,7 @@ HAPI Evas_Object *popup_create_uninstall(Evas_Object *parent, Evas_Object *item) char *markup_name = elm_entry_utf8_to_markup(name); retv_if(NULL == markup_name, popup); - snprintf(warning, sizeof(warning), _("IDS_AT_POP_UNINSTALL_PS_Q"), markup_name); + snprintf(warning, sizeof(warning), _(IDS_AT_POP_UNINSTALL_PS_Q), markup_name); free(markup_name); elm_object_text_set(popup, warning); -- 2.7.4