summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJagrat Patidar <j1.patidar@samsung.com>2019-10-01 23:03:38 +0530
committerJagrat Patidar <j1.patidar@samsung.com>2019-10-01 23:03:38 +0530
commitd0762be2b90073980ecd07ac52916731daa9368c (patch)
tree9084de7406029630cb7efc783d532ad685da4d56
parent3c0cccea325735dcc7398e1bcfc423bce591ffcc (diff)
downloadtaskmanager-d0762be2b90073980ecd07ac52916731daa9368c.tar.gz
taskmanager-d0762be2b90073980ecd07ac52916731daa9368c.tar.bz2
taskmanager-d0762be2b90073980ecd07ac52916731daa9368c.zip
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 <j1.patidar@samsung.com>
-rw-r--r--res/edje/box.edc5
-rw-r--r--res/edje/conf.edc22
-rw-r--r--res/edje/item.edc41
-rw-r--r--res/po/en_GB.po2
-rw-r--r--res/po/en_PH.po2
-rw-r--r--res/po/en_US.po2
-rw-r--r--src/item.c34
-rw-r--r--src/main.c2
-rw-r--r--src/scroller.c4
9 files changed, 55 insertions, 59 deletions
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 /**<Width of the base layout */
-#define BASE_HEIGHT 960 /**<Height of the base layout */
+#define BASE_WIDTH 1280 /**<Width of the base layout */
+#define BASE_HEIGHT 720 /**<Height of the base layout */
#define CLEAR_ICON_WIDTH 62 /**<Width of the clear icon item*/
#define CLEAR_ICON_HEIGHT 62 /**<Height of the clear icon item*/
-#define CLEAR_LINE_WIDTH 2 /**<Width of the clear icon line*/
-#define CLEAR_LINE_HEIGHT 118 /**<Height of the clear icon line*/
-#define CLEAR_ITEM_WIDTH CLEAR_ICON_WIDTH /**<Width of the clear all item icon*/
-#define CLEAR_ITEM_HEIGHT CLEAR_LINE_HEIGHT /**<Height of the clear all item icon*/
+#define CLEAR_LINE_WIDTH 114 /**<Width of the clear icon line*/
+#define CLEAR_LINE_HEIGHT 2 /**<Height of the clear icon line*/
+#define CLEAR_ITEM_WIDTH 142 /**<Width of the clear all item icon*/
+#define CLEAR_ITEM_HEIGHT CLEAR_ICON_HEIGHT /**<Height of the clear all item icon*/
#define ITEM_ICON_WIDTH 118 /**<Width of the item icon*/
#define ITEM_ICON_HEIGHT 118 /**<Height of the item icon*/
-#define ITEM_LINE_WIDTH 2 /**<Width of the item line*/
-#define ITEM_LINE_HEIGHT 180 /**<Height of the item line*/
-#define ITEM_WIDTH ITEM_ICON_WIDTH /**<Width of the entire list item*/
-#define ITEM_HEIGHT ITEM_LINE_HEIGHT /**<Height of the entire list item*/
+#define ITEM_LINE_WIDTH 114 /**<Width of the item line*/
+#define ITEM_LINE_HEIGHT 2 /**<Height of the item line*/
+#define ITEM_WIDTH 232 /**<Width of the entire list item*/
+#define ITEM_HEIGHT ITEM_ICON_HEIGHT /**<Height of the entire list item*/
-#define PADDING_TOP 210 /**<Padding from the top of the view to clear item*/
+#define PADDING_TOP 0 /**<Padding from the top of the view to clear item*/
#define SWIPE_THRESHOLD 0.1 /**<Item swipe threshold. If item position exceeds this value, related
application is killed*/
diff --git a/res/edje/item.edc b/res/edje/item.edc
index dedf3a2..6d7e729 100644
--- a/res/edje/item.edc
+++ b/res/edje/item.edc
@@ -20,10 +20,8 @@
styles {
style {
name: "item_style";
- base: "font=Tizen:style=Bold font_size=30 color=#ffffff align=left style=shadow shadow_color=#000000bf wrap=mixed";
+ base: "font=Tizen:style=Regular font_size=27 color=#ffffff align=left style=shadow shadow_color=#000000bf wrap=mixed";
tag: "br" "\n";
- tag: "hilight" "+ font_weight=Bold";
- tag: "b" "+ font_weight=Bold";
tag: "tab" "\t";
}
}
@@ -58,9 +56,9 @@ collections {
description {
state: "default";
color: 255 255 255 255;
- align: 0.5 1.0;
- min: CLEAR_LINE_WIDTH 0;
- max: CLEAR_LINE_WIDTH -1;
+ align: 0.0 0.5;
+ min: 0 CLEAR_LINE_HEIGHT;
+ max: -1 CLEAR_LINE_HEIGHT;
}
}
part {
@@ -104,7 +102,7 @@ collections {
min: ITEM_ICON_WIDTH ITEM_ICON_HEIGHT;
max: ITEM_ICON_WIDTH ITEM_ICON_HEIGHT;
fixed: 1 1;
- align: 0.5 0.0;
+ align: 1.0 0.5;
}
}
part {
@@ -113,15 +111,16 @@ collections {
description {
state: "default" 0.0;
color: 255 255 255 255;
- rel1 { relative: 1.0 0.0; to: "icon"; offset: 20 0; }
- rel2 { relative: 1.0 1.0; to: "icon"; }
+ rel1 { relative: 0.0 1.0; to: "icon"; }
+ rel2 { relative: 1.0 1.0; to: "icon"; offset: 0 72; }
text {
text: "";
style: "item_style";
min: 1 0;
ellipsis: -1;
}
- align: 0.0 0.5;
+ align: 0.5 0.0;
+ fixed: 1 0;
}
}
part {
@@ -162,8 +161,8 @@ collections {
rel1 { relative: 0.0 1.0; to: "padding.top"; }
rel2 { relative: 1.0 1.0; }
color: 0 0 0 0;
- min: ITEM_WIDTH CLEAR_ITEM_HEIGHT;
- max: ITEM_WIDTH CLEAR_ITEM_HEIGHT;
+ min: 176 CLEAR_ITEM_HEIGHT;
+ max: 176 CLEAR_ITEM_HEIGHT;
}
}
part {
@@ -172,14 +171,10 @@ collections {
scale: 1;
description {
state: "default";
- rel1 {
- relative: 0.0 0.5;
- to_y: "clear_img";
- }
color: 255 255 255 255;
- min: CLEAR_LINE_WIDTH 0;
- max: CLEAR_LINE_WIDTH -1;
- align: 0.5 1.0;
+ min: 120 CLEAR_LINE_HEIGHT;
+ max: 120 CLEAR_LINE_HEIGHT;
+ align: 0.0 0.5;
}
}
part {
@@ -195,7 +190,7 @@ collections {
}
min: CLEAR_ICON_WIDTH CLEAR_ICON_HEIGHT;
max: CLEAR_ICON_WIDTH CLEAR_ICON_HEIGHT;
- align: 0.5 0.0;
+ align: 1.0 0.5;
fixed: 1 1;
}
}
@@ -205,15 +200,15 @@ collections {
description {
state: "default" 0.0;
color: 255 255 255 255;
- rel1 { relative: 1.0 0.0; to: "clear_img"; offset: 48 0; }
- rel2 { relative: 1.0 1.0; to: "clear_img"; }
+ rel1 { relative: 0.0 1.0; to: "clear_img"; }
+ rel2 { relative: 1.0 1.0; to: "clear_img"; offset: 0 110; }
text {
text: "Clear all";
style: "item_style";
min: 1 0;
ellipsis: -1;
}
- align: 0.0 0.5;
+ align: 0.5 0.0;
fixed: 1 0;
}
}
diff --git a/res/po/en_GB.po b/res/po/en_GB.po
index 8191061..0ab1bbe 100644
--- a/res/po/en_GB.po
+++ b/res/po/en_GB.po
@@ -1,6 +1,6 @@
msgid "IDS_TASKMGR_NPBODY_NO_RECENTLY_USED_APPS"
-msgstr "No recently used apps"
+msgstr "No application"
msgid "IDS_TASKMGR_BUTTON_CLOSE_ALL_ABB2"
msgstr "Clear all"
diff --git a/res/po/en_PH.po b/res/po/en_PH.po
index 8191061..0ab1bbe 100644
--- a/res/po/en_PH.po
+++ b/res/po/en_PH.po
@@ -1,6 +1,6 @@
msgid "IDS_TASKMGR_NPBODY_NO_RECENTLY_USED_APPS"
-msgstr "No recently used apps"
+msgstr "No application"
msgid "IDS_TASKMGR_BUTTON_CLOSE_ALL_ABB2"
msgstr "Clear all"
diff --git a/res/po/en_US.po b/res/po/en_US.po
index c06cf3d..93921fb 100644
--- a/res/po/en_US.po
+++ b/res/po/en_US.po
@@ -1,6 +1,6 @@
msgid "IDS_TASKMGR_NPBODY_NO_RECENTLY_USED_APPS"
-msgstr "No recently used apps"
+msgstr "No application"
msgid "IDS_TASKMGR_BUTTON_CLOSE_ALL_ABB2"
msgstr "Clear all"
diff --git a/src/item.c b/src/item.c
index 76a6501..654e350 100644
--- a/src/item.c
+++ b/src/item.c
@@ -214,10 +214,10 @@ static Eina_Bool _anim_move_item(void *data)
evas_object_geometry_get(item_inner, &cur_x, &cur_y, NULL, NULL);
evas_object_geometry_get(item_outer, &end_x, &end_y, NULL, NULL);
- end_pos = end_x;
- vec_pos = (end_x - cur_x)/ANIM_RATE;
- cur_x += vec_pos;
- cur_pos = cur_x;
+ end_pos = end_y;
+ vec_pos = (end_y - cur_y)/ANIM_RATE;
+ cur_y += vec_pos;
+ cur_pos = cur_y;
if ((end_pos - cur_pos) < 0) { /* Move : Right -> 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;