From: Jagrat Patidar Date: Tue, 1 Oct 2019 17:33:38 +0000 (+0530) Subject: This patch includes following features for horizontal taskmanager app for IOT prfile- X-Git-Tag: submit/tizen/20191007.071952~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d0762be2b90073980ecd07ac52916731daa9368c;p=profile%2Fiot%2Fapps%2Fnative%2Ftaskmanager.git This patch includes following features for horizontal taskmanager app for IOT prfile- 1) Taskmanager's horizontal view 2) Termination of a individual app in vertical(upwards or downwards) direction 3) Distance between app icons and their titles and modified their sizes 4) Apps move in left direction when "clear all" is pressed 5) Changed message string for no apps from "No recently used apps" to "No application" Change-Id: Ibe0fdf0eb1c82bcc672b74f09cccefda66453ede Signed-off-by: Jagrat Patidar --- diff --git a/res/edje/box.edc b/res/edje/box.edc index 1136612..0a21348 100644 --- a/res/edje/box.edc +++ b/res/edje/box.edc @@ -42,12 +42,13 @@ collections { state: "default" 0.0; rel1 { relative: 0.0 0.0; } rel2 { relative: 1.0 1.0; } - align: 0.5 1.0; + align: 0.0 0.5; } description { state: "hidden" 1.0; inherit: "default" 0.0; - rel2 { relative: 1.0 2.0; } + rel1 { relative: -1.0 0.0; } + rel2 { relative: 1.0 1.0; } } } } //parts diff --git a/res/edje/conf.edc b/res/edje/conf.edc index 7d6b4dc..1456c65 100644 --- a/res/edje/conf.edc +++ b/res/edje/conf.edc @@ -27,24 +27,24 @@ */ //size -#define BASE_WIDTH 540 /** Left */ evas_object_move(item_inner, cur_x, cur_y); @@ -326,13 +326,13 @@ static Eina_Bool _anim_terminate_item(void *data) evas_object_geometry_get(item_inner, &item_x, &item_y, &item_w, &item_h); evas_object_geometry_get(item_outer, &outer_x, &outer_y, NULL, NULL); - if (item_x >= outer_x) { - item_x += TERMINATE_LENGTH; + if (item_y >= outer_y) { + item_y += TERMINATE_LENGTH; } else { - item_x -= TERMINATE_LENGTH; + item_y -= TERMINATE_LENGTH; } - if (item_x >= main_get_info()->root_w || (item_x + item_w) <= 0) { + if (item_y >= main_get_info()->root_h || (item_y + item_h) <= 0) { is_boundary = 1; } @@ -466,15 +466,15 @@ static void _move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) vec_x = cur_x - down_x; vec_y = cur_y - down_y; - outer_x += vec_x; + outer_y += vec_y; if (!evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_MOVED)) { - if (abs(vec_y) > abs(vec_x) + SCROLLER_THRESHOLD) { + if (abs(vec_x) > abs(vec_y) + SCROLLER_THRESHOLD) { evas_object_data_set(item_outer, PRIVATE_DATA_KEY_SCROLLED, (void *)1); return; } - if (abs(vec_x) <= PRIVATE_MOVE_THRESHOLD) return; - if (abs(vec_y) >= SCROLLER_THRESHOLD) return; + if (abs(vec_y) <= PRIVATE_MOVE_THRESHOLD) return; + if (abs(vec_x) >= SCROLLER_THRESHOLD) return; } evas_object_data_set(item_outer, PRIVATE_DATA_KEY_ITEM_MOVED, (void *) 1); @@ -529,7 +529,7 @@ static void _up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) int init_pos, item_pos; int icon_x, icon_y, icon_w, icon_h; - int screen_w; + int screen_w, screen_h; _D("Up (%d, %d)", x, y); @@ -550,18 +550,18 @@ static void _up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) Evas_Object *item_inner = evas_object_data_get(item_outer, PRIVATE_DATA_KEY_ITEM_INNER_FOR_MOVING); if (!item_inner) return; - init_pos = (int) evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_X); + init_pos = (int) evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_Y); evas_object_data_del(item_outer, PRIVATE_DATA_KEY_ITEM_Y); - evas_object_geometry_get(item_inner, &item_pos, NULL, NULL, NULL); + evas_object_geometry_get(item_inner, NULL, &item_pos, NULL, NULL); Evas_Object *item_icon = elm_object_part_content_get(obj, "icon"); if (!item_icon) return; evas_object_geometry_get(obj, &icon_x, &icon_y, &icon_w, &icon_h); - elm_win_screen_size_get(main_get_info()->win, NULL, NULL, &screen_w, NULL); + elm_win_screen_size_get(main_get_info()->win, NULL, NULL, &screen_w, &screen_h); - if (icon_x < screen_w * SWIPE_LEFT_THRESHOLD || icon_x + icon_w > screen_w * SWIPE_RIGHT_THRESHOLD + if (icon_y < screen_h * SWIPE_LEFT_THRESHOLD || icon_y + icon_h > screen_h * SWIPE_RIGHT_THRESHOLD || (up_time - down_time < PRIVATE_FLICK_TIME && abs(item_pos - init_pos) > 0)) { _item_terminate_anim(item_outer); diff --git a/src/main.c b/src/main.c index 3d9c6c2..24e4234 100644 --- a/src/main.c +++ b/src/main.c @@ -175,11 +175,11 @@ static Eina_Bool _list_timer_cb(void *data) _E("Fail to create clear all button"); return ECORE_CALLBACK_CANCEL; } - scroller_push_item(main_info.scroller, clear_item); if (TASK_MGR_ERROR_NONE != scroller_push_all_item(main_info.scroller, main_info.pkg_list)) { _E("scroller_push_all_item failed"); } + scroller_push_item(main_info.scroller, clear_item); END: evas_object_data_del(main_info.win, PRIVATE_DATA_KEY_LIST_TIMER); diff --git a/src/scroller.c b/src/scroller.c index f6d20ee..36b80be 100644 --- a/src/scroller.c +++ b/src/scroller.c @@ -310,8 +310,8 @@ Evas_Object *scroller_create(Evas_Object *layout) evas_object_del(scroller); return NULL; } - elm_box_horizontal_set(box, EINA_FALSE); - elm_box_align_set(box, 0.5, 1.0); + elm_box_horizontal_set(box, EINA_TRUE); + elm_box_align_set(box, 0.0, 0.5); elm_object_part_content_set(box_layout, BOX_GROUP_NAME, box); evas_object_show(box); main_get_info()->box = box;