From: Jagrat Patidar Date: Thu, 1 Aug 2019 17:47:10 +0000 (+0530) Subject: Cluster View Edit, 5x3 Apps View/Edit, Folder Delete, Apps/Folder Noti Badges X-Git-Tag: submit/tizen/20190807.220101~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9542c6b69eb6517d1aa08ac748fdb955bb007c29;p=profile%2Fiot%2Fapps%2Fnative%2Fhomescreen-efl.git Cluster View Edit, 5x3 Apps View/Edit, Folder Delete, Apps/Folder Noti Badges This patch enables following features for Common profile: 1) Cluster view edit (Page 3) 2) 5x3 Apps/Folders View, Notification badges (Page 11, 12) 3) 5x3 Apps View Edit (Page 14, 15) Change-Id: I3740c392e31579c8598109722405831177ec043f Signed-off-by: Jagrat Patidar --- diff --git a/inc/conf.h b/inc/conf.h index b0cd600..289f8de 100755 --- a/inc/conf.h +++ b/inc/conf.h @@ -72,17 +72,23 @@ extern int __conf_get_cluster_all_page_w(); #define HEIGHT_COEFFICIENT (__conf_get_resolution_scale_h()) #define AREA_COEFFICIENT (__conf_get_resolution_scale_area()) -#define APPS_VIEW_PADDING_TOP INDICATOR_H + ((28) * (__conf_get_resolution_scale_h())) +#define APPS_VIEW_PADDING_TOP 0 #define APPS_VIEW_W ((720) * (__conf_get_resolution_scale_w())) -#define APPS_VIEW_H ((1060) * (__conf_get_resolution_scale_h())) +#define APPS_VIEW_H ((1280) * (__conf_get_resolution_scale_h())) #define APPS_VIEW_ANIMATION_DELTA ((100) * (__conf_get_resolution_scale_h())) -#define APPS_VIEW_ICON_COMMON_IMAGE ((41) * (__conf_get_resolution_scale_w())) -#define APPS_VIEW_ICON_IMAGE ((118) * (__conf_get_resolution_scale_w())) +#define APPS_VIEW_ICON_COMMON_IMAGE 84 +#define APPS_VIEW_ICON_IMAGE 84 -#define APPS_VIEW_ICON_TEXT_SIZE_NORMAL ((28) * (__conf_get_resolution_scale_h())) -#define APPS_VIEW_ICON_TEXT_SIZE_EDIT ((25) * (__conf_get_resolution_scale_h())) -#define APPS_VIEW_ICON_TEXT_COLOR_WHITE "FFFFFF" +#define APPS_VIEW_ICON_CONTENT_WIDTH 144 +#define APPS_VIEW_ICON_CONTENT_HEIGHT 152 + +#define APPS_VIEW_ICON_CONTENT_HORIZONTAL_DISTANCE 240 +#define APPS_VIEW_ICON_CONTENT_VERTICAL_DISTANCE 192 + +#define APPS_VIEW_ICON_TEXT_SIZE_NORMAL 20 +#define APPS_VIEW_ICON_TEXT_SIZE_EDIT 20 +#define APPS_VIEW_ICON_TEXT_COLOR_WHITE "FFFAFAFA" #define APPS_VIEW_ICON_TEXT_COLOR_BLACK "000000" #define APPS_VIEW_EDIT_LEFT_SCROLL_REGION ((72) * (__conf_get_resolution_scale_w())) diff --git a/inc/edc_conf.h b/inc/edc_conf.h index 05e2bde..303dc87 100755 --- a/inc/edc_conf.h +++ b/inc/edc_conf.h @@ -99,6 +99,7 @@ #define SIGNAL_SET_BLACK_TEXT "set_black_text" #define SIGNAL_EDIT_MODE_ON_ANI "edit_on_ani" #define SIGNAL_EDIT_MODE_ON "edit_on" + #define SIGNAL_EDIT_MODE_ON_DONE "edit_on_done" #define SIGNAL_EDIT_MODE_OFF_ANI "edit_off_ani" #define SIGNAL_EDIT_MODE_OFF "edit_off" @@ -117,7 +118,7 @@ #define SIGNAL_APPS_VIEW_HIDE "apps_bg_hide" #define SIGNAL_APPS_VIEW_SHOW "apps_bg_show" #define SIGNAL_APPS_VIEW_ANIM "apps_bg_anim" -#define APPS_VIEW_COL 4 +#define APPS_VIEW_COL 3 #define APPS_VIEW_ROW 5 #define APPS_VIEW_COL_COMMON APPS_VIEW_ROW #define APPS_VIEW_ROW_COMMON APPS_VIEW_COL diff --git a/res/edje/app_icon.edc b/res/edje/app_icon.edc index e48c51a..9bdfde7 100755 --- a/res/edje/app_icon.edc +++ b/res/edje/app_icon.edc @@ -31,11 +31,11 @@ images { styles { style{ name: "icon_label"; - base: "font=Tizen:style=Regular align=center color=#FFFFFFFF style=shadow,bottom shadow_color=#000000FF font_size=26 ellipsis=1.0 wrap=mixed"; + base: "font=Tizen:style=Regular align=center color=#FFFAFAFA style=shadow, font_size=19 ellipsis=1.0 wrap=mixed"; } style{ name: "icon_label_edit"; - base: "font=Tizen:style=Regular align=center color=#FFFFFFFF style=shadow,bottom shadow_color=#000000FF font_size=23 ellipsis=1.0 wrap=mixed"; + base: "font=Tizen:style=Regular align=center color=#FFFAFAFA style=shadow, font_size=17 ellipsis=1.0 wrap=mixed"; } } collections { @@ -56,9 +56,11 @@ collections { type: SWALLOW; description { state: "default" 0.0; - rel1{relative: 0.16 0; to: SIZE_SETTER;} - rel2{relative: 0.84 0.6; to: SIZE_SETTER;} - align: 0.5 0.5; + rel1{relative: 30/144 8/152; to: SIZE_SETTER;} + rel2{relative: 114/144 92/152; to: SIZE_SETTER;} + align: 0.5 0; + min: 84 84; + max: 84 84; fixed: 1 1; } } //APPS_ICON_CONTENT @@ -159,8 +161,8 @@ collections { repeat_events: 1; description { state: "default" 0.0; - rel1{relative: 0.04 0.6; to: SIZE_SETTER;} - rel2{relative: 0.95 0.98; to: SIZE_SETTER;} + rel1{relative: 0 103/152; to: SIZE_SETTER;} + rel2{relative: 1 1.02; to: SIZE_SETTER;} color: 255 255 255 255; text { style: "icon_label"; @@ -189,6 +191,8 @@ collections { rel1{relative: 0.0 0.0; offset: -10 -1; to: APPS_ICON_BADGE_TEXT;} rel2{relative: 1.0 1.0; offset: 13 1; to: APPS_ICON_BADGE_TEXT;} visible: 0; + min : 40 40; + max : 40 40; image { normal: "icon_badge_container.png"; @@ -212,13 +216,13 @@ collections { visible: 0; fixed: 1 1; color: 255 255 255 255; - rel1{relative: 0.95 0.0; to: APPS_ICON_CONTENT;} + rel1{relative: 0.97 -0.017; to: APPS_ICON_CONTENT;} rel2{relative: 0.95 0.0; to: APPS_ICON_CONTENT;} align: 1.0 0.0; text { font: "arial"; - size: 12; + size: 10; text_class: "ATO002"; min: 1 1; max: 1 1; @@ -237,11 +241,13 @@ collections { scale: 0; description { state: "default" 0.0; - rel1{relative: 0.0 -0.1; to: SIZE_SETTER;} - rel2{relative: 0.4 0.4; to: SIZE_SETTER;} + rel1{relative: 0.145 0.08; to: SIZE_SETTER;} + rel2{relative: 0.355 0.27; to: SIZE_SETTER;} color: 255 255 255 0; visible: 0; aspect: 1.0 1.0; + min: 44 44; + max: 44 44; aspect_preference: BOTH; image { normal: "btn_delete_nor.png"; diff --git a/res/edje/apps_view.edc b/res/edje/apps_view.edc index 08e6383..9d1ede3 100755 --- a/res/edje/apps_view.edc +++ b/res/edje/apps_view.edc @@ -42,13 +42,13 @@ collections { rel1 {relative: 0.0 0.0; to:SIZE_SETTER;} rel2 {relative: 1.0 1.0; to:SIZE_SETTER;} color: 0 0 0 0; - visible: 0; + visible: 1; } description { state: "edit_done" 0.0; inherit: "default" 0.0; - rel1 {relative :0.05 0.03; to: SIZE_SETTER;} - rel2 {relative :0.95 0.95; to: SIZE_SETTER;} + rel1 {relative :88/1280 96/720; to: SIZE_SETTER;} + rel2 {relative :1192/1280 625/720; to: SIZE_SETTER;} color: 0 0 0 APPS_VIEW_BG_OPACITY; visible: 1; } @@ -66,8 +66,8 @@ collections { description { state: "edit" 0.0; inherit: "default" 0.0; - rel1 {relative :0.05 0.05; to: SIZE_SETTER;} - rel2 {relative :0.95 0.95; to: SIZE_SETTER;} + rel1 {relative :25/1104 13/529; to: SIZE_SETTER;} + rel2 {relative :1077/1104 516/529; to: SIZE_SETTER;} } } } @@ -129,4 +129,5 @@ collections { } } } -} \ No newline at end of file +} + diff --git a/res/edje/apps_view_bg.edc b/res/edje/apps_view_bg.edc index 4937956..7fa7858 100755 --- a/res/edje/apps_view_bg.edc +++ b/res/edje/apps_view_bg.edc @@ -58,8 +58,8 @@ collections { state: "edit" 0.0; inherit: "default" 0.0; visible: 1; - rel1 {relative: 0.052 0.08; to:SIZE_SETTER;} - rel2 {relative: 0.95 0.845; to:SIZE_SETTER;} + rel1{relative: 88/1280 96/720; to: SIZE_SETTER;} + rel2{relative: 1192/1280 625/720; to: SIZE_SETTER;} } description { state: "hide" 0.0; diff --git a/res/edje/cluster_page_common.edc b/res/edje/cluster_page_common.edc old mode 100644 new mode 100755 index 610c28c..52953f9 --- a/res/edje/cluster_page_common.edc +++ b/res/edje/cluster_page_common.edc @@ -47,10 +47,8 @@ collections { inherit: "default" 0.0; color : 0 0 0 50; visible: 1; - rel1{relative: 0.057 0.066; to: SIZE_SETTER;} - rel2{relative: 0.943 1.0; to: SIZE_SETTER;} - aspect: 1.0 1.0; - aspect_preference: BOTH; + rel1{relative: 88/1280 96/720; to: SIZE_SETTER;} + rel2{relative: 1192/1280 625/720; to: SIZE_SETTER;} } } part { name: CLUSTER_BOX; diff --git a/res/edje/widget.edc b/res/edje/widget.edc index c6e0906..bdae5bf 100755 --- a/res/edje/widget.edc +++ b/res/edje/widget.edc @@ -90,8 +90,8 @@ collections { scale: 0; description { state: "default" 0.0; - rel1{relative: 0.055 0.055; to: SIZE_SETTER;} - rel2{relative: 0.388 0.388; to: SIZE_SETTER;} + rel1{relative: 10/1104 9/529;} + rel2{relative: 50/1104 49/529;} color: 255 255 255 0; visible: 0; aspect: 1.0 1.0; diff --git a/res/images/icon_badge_container.png b/res/images/icon_badge_container.png index ac4affc..fe3512d 100755 Binary files a/res/images/icon_badge_container.png and b/res/images/icon_badge_container.png differ diff --git a/src/apps_view.c b/src/apps_view.c index b5a4da1..ca178fe 100755 --- a/src/apps_view.c +++ b/src/apps_view.c @@ -548,26 +548,30 @@ bool apps_view_icon_set(app_data_t *item) if (item->parent_db_id == APPS_ROOT) { page_index = item->position / (APPS_VIEW_COL*APPS_VIEW_ROW); if (_COMMON) { - w = APPS_VIEW_W / APPS_VIEW_COL_COMMON; - h = APPS_VIEW_H / APPS_VIEW_ROW_COMMON; + w = 240; + h = 192; row = (item->position / APPS_VIEW_COL_COMMON) % APPS_VIEW_ROW_COMMON; col = item->position % APPS_VIEW_COL_COMMON; } else { w = APPS_VIEW_W / APPS_VIEW_COL; h = APPS_VIEW_H / APPS_VIEW_ROW; - row = (item->position / APPS_VIEW_COL) % APPS_VIEW_ROW; - col = item->position % APPS_VIEW_COL; + row = (item->position / 5) % 3; + col = item->position % 5; } - x = col * w; - y = row * h; - + w = APPS_VIEW_ICON_CONTENT_HORIZONTAL_DISTANCE; + h = APPS_VIEW_ICON_CONTENT_VERTICAL_DISTANCE; + x = 88 + col * w; + y = 88 + row * h; if (eina_list_count(apps_view_s.page_list) < page_index+1) { page = __apps_view_add_page(); } else page = eina_list_nth(apps_view_s.page_list, page_index); + + grid = elm_object_part_content_get(page, APPS_VIEW_GRID); - elm_grid_pack(grid, item->app_layout, x, y, w, h); + + elm_grid_pack(grid, item->app_layout, x, y, APPS_VIEW_ICON_CONTENT_WIDTH, APPS_VIEW_ICON_CONTENT_HEIGHT); __D("[%s : %s] -> [%s], [%p] page : %d", item->app_id, item->label_str, icon_container, item->app_layout, page_index); return true; @@ -674,7 +678,7 @@ static void __apps_view_create_base_gui(Evas_Object *win) apps_view_s.box = elm_box_add(apps_view_s.scroller); elm_box_horizontal_set(apps_view_s.box, EINA_TRUE); - elm_box_align_set(apps_view_s.box, 0.5, 0.5); + elm_box_align_set(apps_view_s.box, 0, 0); evas_object_show(apps_view_s.box); elm_object_content_set(apps_view_s.scroller, apps_view_s.box); @@ -1566,7 +1570,6 @@ static void __apps_view_badge_update_folder(int parent_db_id) } else { snprintf(number_str, sizeof(number_str), "%d", badge_count); } - if (folder_item && folder_item->app_layout) { if (badge_count <= 0) { elm_object_signal_emit(folder_item->app_layout, SIGNAL_BADGE_HIDE, SIGNAL_SOURCE); @@ -2014,9 +2017,8 @@ static void __apps_view__set_icon_label_style(app_data_t *item, view_state_t sta { char style_string[STR_MAX] = {0, }; char *text_color = item->parent_db_id == APPS_ROOT ? APPS_VIEW_ICON_TEXT_COLOR_WHITE : APPS_VIEW_ICON_TEXT_COLOR_BLACK; - char *text_shadow_color = item->parent_db_id == APPS_ROOT ? "000000FF" : "FFFFFFFF"; int font_size = (state == VIEW_STATE_NORMAL || item->parent_db_id != APPS_ROOT) ? APPS_VIEW_ICON_TEXT_SIZE_NORMAL : APPS_VIEW_ICON_TEXT_SIZE_EDIT; - snprintf(style_string, sizeof(style_string), "%s", font_size, text_color, text_shadow_color, item->label_str); + snprintf(style_string, sizeof(style_string), "%s", font_size, text_color, item->label_str); elm_object_part_text_set(item->app_layout, APPS_ICON_NAME, style_string); }