From 0bbdbe4e3920dc863a139f77b36df8445664ff95 Mon Sep 17 00:00:00 2001 From: Denis Dolzhenko Date: Fri, 11 Nov 2016 14:47:48 +0200 Subject: [PATCH] TizenRefApp-6995 [WVGA Emulator] Apps icons and titles cut in do not disturb settings Change-Id: I898f800d0a4b1bed3f1848f2c24278974aa0ca1b Signed-off-by: Denis Dolzhenko --- res/edje/setting_notification.edc | 13 +++++++------ src/common-efl.c | 2 +- src/do-not-disturb-efl.c | 10 +++++----- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/res/edje/setting_notification.edc b/res/edje/setting_notification.edc index c863c74..c875407 100644 --- a/res/edje/setting_notification.edc +++ b/res/edje/setting_notification.edc @@ -14,12 +14,13 @@ * limitations under the License. */ #define ALLOWED_APP_BG_H 191 -#define ALLOWED_APP_BG_W 98 -#define ALLOWED_APP_ICON_H 98 -#define ALLOWED_APP_ICON_W 98 +#define ALLOWED_APP_BG_W 93 +#define ALLOWED_APP_ICON_H 93 +#define ALLOWED_APP_ICON_W 93 #define ALLOWED_APP_CENTER_PAD 13 #define ALLOWED_APP_TEXT_OVER 40 -#define SIDE_PAD_W 32 +#define ALLOWED_APP_TEXT_PAD_W 8 +#define SIDE_PAD_W 26 #define HEADER_TEXT_H 64 #define SELECT_BUTTON_HOR_PAD_H 14 #define SELECT_BUTTON_H 52 @@ -29,7 +30,7 @@ collections { base_scale: 2.6; styles { style { name: "text_style"; - base: "font=Samsungcondenced:style=Regular font_size=30 text_class=tizen align=center valign=top color=#000000 ellipsis=-1 wrap=mixed linesize=40"; + base: "font=Samsungcondenced:style=Regular font_size=30 text_class=tizen align=center valign=top color=#000000 ellipsis=-1 wrap=mixed"; } style { name: "header_text_style"; base: "color=#3296A6FF font=Tizen:style=Regular font_size=32 text_class=tizen ellipsis=1.0"; @@ -238,7 +239,7 @@ collections { rel2.relative: 1.0 0.0; align: 0.5 0.0; min: 0 0; - max: (ALLOWED_APP_BG_W + ALLOWED_APP_TEXT_OVER) 80; + max: (ALLOWED_APP_BG_W + ALLOWED_APP_TEXT_OVER - ALLOWED_APP_TEXT_PAD_W) 80; text.style: "text_style"; text.min: 0 1; } diff --git a/src/common-efl.c b/src/common-efl.c index 76163c8..2d709d5 100755 --- a/src/common-efl.c +++ b/src/common-efl.c @@ -22,7 +22,7 @@ #include "app-details.h" #include "excepted-apps-efl.h" -#define ICON_SIZE 82 +#define ICON_SIZE ELM_SCALE_SIZE(82) static ug_data *g_ug_data = NULL; diff --git a/src/do-not-disturb-efl.c b/src/do-not-disturb-efl.c index 8bfce47..672f2ba 100755 --- a/src/do-not-disturb-efl.c +++ b/src/do-not-disturb-efl.c @@ -28,9 +28,9 @@ #define APP_LAYOUT_NAME "allowed_app_layout" #define APP_LAYOUT_ICON_PART "icon" #define APP_LAYOUT_TEXT_PART "text" -#define APP_LAYOUT_HEIGHT 191 -#define APP_LAYOUT_PAD 30 -#define APP_LAYOUT_HEADER 95 + 64 +#define APP_LAYOUT_HEIGHT ELM_SCALE_SIZE(191) +#define APP_LAYOUT_PAD ELM_SCALE_SIZE(30) +#define APP_LAYOUT_HEADER ELM_SCALE_SIZE(95 + 64) #define ITEMS_PER_ROW 5 void do_not_disturb_append_items_in_list(Evas_Object* genlist) @@ -65,7 +65,7 @@ Evas_Object *do_not_disturb_allowed_apps_cont_cb(Evas_Object* parent, void *data Eina_List *allowed_apps_list = (Eina_List *)data; Evas_Object *table = elm_table_add(full_layout); - elm_table_padding_set(table, 0, APP_LAYOUT_PAD); + elm_table_homogeneous_set(table, true); int count = eina_list_count(allowed_apps_list); int height = (APP_LAYOUT_HEIGHT + APP_LAYOUT_PAD) * (count / ITEMS_PER_ROW + (count % ITEMS_PER_ROW != 0 ? 1 : 0)) + APP_LAYOUT_HEADER; @@ -84,7 +84,7 @@ Evas_Object *do_not_disturb_allowed_apps_cont_cb(Evas_Object* parent, void *data Evas_Object *icon = create_icon(app_layout, item->icon); evas_object_show(icon); elm_object_part_content_set(app_layout, APP_LAYOUT_ICON_PART,icon); - elm_object_part_text_set(app_layout, APP_LAYOUT_TEXT_PART,item->name); + elm_object_part_text_set(app_layout, APP_LAYOUT_TEXT_PART, item->name); elm_table_pack(table, app_layout, items_in_row, row_number, 1, 1); allowed_apps_list = eina_list_next(allowed_apps_list); -- 2.7.4