From: Seonah Moon Date: Tue, 18 Aug 2020 11:43:00 +0000 (+0900) Subject: iot common: modify some details #2 X-Git-Tag: accepted/tizen/unified/20200824.134517~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a654cd95c2bf170a7191bbb40032cc2d8841fa2;p=apps%2Fnative%2Fug-wifi-efl.git iot common: modify some details #2 - fix scan/forget button size - fix info icon size - adjust scan list padding - move icon/toggle button to the left in wifi network info - change the color of connection status message if ap is connected Change-Id: I69abd40edac17833d7811562a68c02b8cb8ff539 --- diff --git a/common/common_ip_info.c b/common/common_ip_info.c index df677b9..b3f76e6 100644 --- a/common/common_ip_info.c +++ b/common/common_ip_info.c @@ -1113,8 +1113,11 @@ static Evas_Object *_ip_info_iptoggle_content_get(void *data, full_ip_info_t *ip_data = (full_ip_info_t *) data; ip_info_list_t *ip_info_list_data = ip_data->ip_info_list; Evas_Object *toggle_btn = NULL; + const char *content_part = (common_util_get_ug_type() == UG_VIEW_IOT_COMMON) ? + g_genlist_info[WIFI_GENLIST_1LINE_STYLE].content_part : + g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_content_part; - if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_content_part, part)) { + if (!strcmp(content_part, part)) { toggle_btn = elm_check_add(obj); elm_object_style_set(toggle_btn, "on&off"); elm_object_focus_allow_set(toggle_btn, EINA_FALSE); diff --git a/common/common_utils.c b/common/common_utils.c index fcf7736..cf6f79e 100644 --- a/common/common_utils.c +++ b/common/common_utils.c @@ -43,7 +43,7 @@ /* Icon Size*/ #define BUTTON_CIRCLE_SIZE 40 -#define COMMON_BUTTON_CIRCLE_SIZE 30 +#define COMMON_BUTTON_CIRCLE_SIZE 16 #define OOBE_BUTTON_CIRCLE_SIZE_H 33 #define OOBE_BUTTON_CIRCLE_SIZE_W 45 @@ -51,7 +51,8 @@ #define SMALL_FONT_SIZE 28 #define MID_FONT_SIZE 30 #define BIG_FONT_SIZE 32 -#define COMMON_SMALL_FONT_SIZE 18 +#define COMMON_SMALL_FONT_SIZE 16 +#define COMMON_MID_FONT_SIZE 18 #define COMMON_BIG_FONT_SIZE 22 #define OOBE_SMALL_FONT_SIZE 16 #define OOBE_MID_FONT_SIZE 18 @@ -933,7 +934,7 @@ void common_util_update_content_size(void) g_content_size_info.progress = PROGRESS_MID; } else if (g_ug_type == UG_VIEW_IOT_COMMON) { g_content_size_info.small_font = COMMON_SMALL_FONT_SIZE; - g_content_size_info.mid_font = COMMON_SMALL_FONT_SIZE; + g_content_size_info.mid_font = COMMON_MID_FONT_SIZE; g_content_size_info.big_font = COMMON_BIG_FONT_SIZE; g_content_size_info.icon_w = COMMON_BUTTON_CIRCLE_SIZE; g_content_size_info.icon_h = COMMON_BUTTON_CIRCLE_SIZE; diff --git a/ui-gadget/edc/custom_editfield.edc b/ui-gadget/edc/custom_editfield.edc index 2bc9f86..fe4a699 100644 --- a/ui-gadget/edc/custom_editfield.edc +++ b/ui-gadget/edc/custom_editfield.edc @@ -25,8 +25,9 @@ #define PASSWORD_EDITFIELD_ELM_SWALLOW_END_MIN_INC 18 18 #define PASSWORD_EDITFIELD_PADDING_SWALLOW_END_LEFT_MIN_INC 32 0 -#define BUTTON_BG_SIZE 96 96 -#define BUTTON_CIRCLE_SIZE 46 46 +#define BUTTON_BG_SIZE 40 40 +#define BUTTON_CIRCLE_SIZE 40 40 +#define BUTTON_CIRCLE_SIZE_SMALL 28 28 #define RESOURCE_IMAGE( INPUT_FILE_NAME ) \ group { \ @@ -413,8 +414,8 @@ group { part { name: "base"; scale: 1; description { state: "default" 0.0; - min: BUTTON_CIRCLE_SIZE; - max: BUTTON_CIRCLE_SIZE; + min: BUTTON_CIRCLE_SIZE_SMALL; + max: BUTTON_CIRCLE_SIZE_SMALL; image.normal: "wifi_icon_badge_container.png"; color_class: "W015L6E1"; rel1 { @@ -445,39 +446,23 @@ group { color: 2 61 132 76.5; } } - /* part { name: "bg_effect"; - scale: 1; - description { state: "default" 0.0; - rel1.to: "bg"; - rel2.to: "bg"; - image.normal: "core_button_effect_normal.#.png"; - } - description { state: "pressed" 0.0; - inherit: "default" 0.0; - image.normal: "core_button_effect_pressed.#.png"; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - visible: 0; - } - } */ part { name: "elm.swallow.content"; type: SWALLOW; scale: 1; description { state: "default" 0.0; - min: BUTTON_CIRCLE_SIZE; - max: BUTTON_CIRCLE_SIZE; + min: BUTTON_CIRCLE_SIZE_SMALL; + max: BUTTON_CIRCLE_SIZE_SMALL; rel1.to: "bg"; rel2.to: "bg"; - color: 255 255 255 255; + color: 255 255 255 255; } description { state: "visible" 0.0; inherit: "default" 0.0; - color: 255 255 255 255; + color: 255 255 255 255; } description { state: "disabled" 0.0; inherit: "default" 0.0; - color: 255 255 255 127.5; + color: 255 255 255 127.5; } } part { name: "mid_padding"; diff --git a/ui-gadget/edc/custom_genlist.edc b/ui-gadget/edc/custom_genlist.edc index 191487e..cb57989 100644 --- a/ui-gadget/edc/custom_genlist.edc +++ b/ui-gadget/edc/custom_genlist.edc @@ -18,13 +18,15 @@ #define CUSTOM_GENLIST_LR_PADDING 60 #define CUSTOM_GENLIST_TB_PADDING 30 -#defien CUSTOM_GENLIST_TOP_PADDING 40 +#defien CUSTOM_GENLIST_TOP_PADDING 30 #define CUSTOM_GENLIST_BOTTOM_PADDING 15 -#define CUSTOM_GENLIST_BUTTON_LR_PADDING 400 +#define CUSTOM_GENLIST_BUTTON_LR_PADDING 700 #define CUSTOM_GENLIST_BUTTON_TOP_PADDING 100 #define CUSTOM_GENLIST_BUTTON_BOTTOM_PADDING 30 +#define CUSTOM_GENLIST_BUTTON_SIZE_MIN 240 72 + #define CUSTOM_GENLIST_TITLE_TEXT_SIZE 36 #define CUSTOM_GENLIST_TEXT_COLOR 0 20 71 255 @@ -356,6 +358,7 @@ group { name: "gl_custom_list_button_item"; type: SWALLOW; scale: 1; description { state: "default" 0.0; + min: CUSTOM_GENLIST_BUTTON_SIZE_MIN; align: 0.5 0.0; rel1 { to_x: "left_padding"; diff --git a/ui-gadget/view_detail.c b/ui-gadget/view_detail.c index ccc5a47..e61d0db 100644 --- a/ui-gadget/view_detail.c +++ b/ui-gadget/view_detail.c @@ -263,7 +263,7 @@ static char *_view_detail_grouptitle_text_get(void *data, char *tmp = NULL; char *txt = NULL; - if (!strcmp(g_genlist_info[WIFI_GENLIST_2LINE_STYLE].text_part, part)) { + if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part)) { _detail_data = (view_detail_data *)data; retvm_if(NULL == _detail_data, NULL); @@ -287,8 +287,11 @@ static Evas_Object *_view_detail_grouptitle_content_get(void *data, Evas_Object view_detail_data *_detail_data = (view_detail_data *)data; _detail_data = (view_detail_data *)data; Evas_Object* icon = NULL; + const char *content_part = ug_app_state->ug_type == UG_VIEW_IOT_COMMON ? + g_genlist_info[WIFI_GENLIST_1LINE_STYLE].content_part : + g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_content_part; - if (!strcmp(g_genlist_info[WIFI_GENLIST_2LINE_STYLE].sub_content_part, part)) { + if (!strcmp(content_part, part)) { char *temp_str = NULL; /* for strength */ @@ -745,7 +748,7 @@ void view_detail(wifi_device_info_t *device_info, Evas_Object *win_main, if (ug_app_state->ug_type == UG_VIEW_IOT_COMMON) evas_object_smart_callback_add(detailview_list, "realized", gl_realized, NULL); - grouptitle_itc.item_style = g_genlist_info[WIFI_GENLIST_2LINE_STYLE].style_name; + grouptitle_itc.item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name; grouptitle_itc.func.text_get = _view_detail_grouptitle_text_get; grouptitle_itc.func.content_get = _view_detail_grouptitle_content_get; grouptitle_itc.func.state_get = NULL; diff --git a/ui-gadget/wifi_viewer_list.c b/ui-gadget/wifi_viewer_list.c index ada215c..591d11c 100644 --- a/ui-gadget/wifi_viewer_list.c +++ b/ui-gadget/wifi_viewer_list.c @@ -91,42 +91,43 @@ static char* _gl_listview_text_get(void *data, Evas_Object *obj, const char *par char* buf = NULL; char* convertedColor = NULL; int ug_type = wifi_get_ug_type(); - + int font_size = 0; + int change_color = 0; ug_genlist_data_t* gdata = (ug_genlist_data_t*) data; + retvm_if(NULL == gdata || NULL == gdata->device_info, NULL); assertm_if(NULL == gdata->device_info->ssid, "NULL!!"); if (!strcmp(g_genlist_info[WIFI_GENLIST_2LINE_STYLE].text_part, part)) { det = evas_textblock_text_utf8_to_markup(NULL, gdata->device_info->ssid); - assertm_if(NULL == det, "NULL!!"); - assertm_if(NULL == convertedColor, "NULL!!"); - - if (ug_type != UG_VIEW_OOBE && VIEWER_ITEM_RADIO_MODE_CONNECTED == gdata->radio_mode) { - convertedColor = ConvertRGBAtoHex(61, 185, 204, 255); - buf = g_strdup_printf("%s", - convertedColor, g_content_size_info.big_font, det); - g_free(det); - g_free(convertedColor); - return buf; - } else { - buf = g_strdup_printf("%s", - g_content_size_info.big_font, det); - g_free(det); - return buf; - } + font_size = g_content_size_info.big_font; + } else if (!strcmp(g_genlist_info[WIFI_GENLIST_2LINE_STYLE].sub_text_part, part) && gdata->device_info->ap_status_txt != NULL) { det = g_strdup(gdata->device_info->ap_status_txt); - assertm_if(NULL == det, "NULL!!"); + font_size = g_content_size_info.small_font; + } else { + return NULL; + } + + if (ug_type != UG_VIEW_OOBE && VIEWER_ITEM_RADIO_MODE_CONNECTED == gdata->radio_mode) + change_color = 1; - buf = g_strdup_printf("%s", - g_content_size_info.small_font, det); - g_free(det); - return buf; + assertm_if(NULL == det, "NULL!!"); + + if (change_color) { + convertedColor = ConvertRGBAtoHex(61, 185, 204, 255); + buf = g_strdup_printf("%s", + convertedColor, font_size, det); + g_free(convertedColor); + } else { + buf = g_strdup_printf("%s", font_size, det); } - return det; + g_free(det); + + return buf; } static Evas_Object *_gl_listview_content_get(void *data, Evas_Object *obj, const char *part) @@ -136,6 +137,7 @@ static Evas_Object *_gl_listview_content_get(void *data, Evas_Object *obj, const Evas_Object *icon = NULL; Evas_Object *btn = NULL; + UG_TYPE ug_type = wifi_get_ug_type(); if (gdata->device_info->ap_image_path == NULL) { /* if there is no ap_image_path (NO AP Found situation) */ @@ -151,7 +153,7 @@ static Evas_Object *_gl_listview_content_get(void *data, Evas_Object *obj, const elm_image_file_set(icon, CUSTOM_EDITFIELD_PATH, temp_str); g_free(temp_str); - if (wifi_get_ug_type() == UG_VIEW_OOBE) + if (ug_type == UG_VIEW_OOBE) evas_object_color_set(icon, 0, 10, 10, 204); else evas_object_color_set(icon, 2, 61, 132, 204); @@ -167,15 +169,16 @@ static Evas_Object *_gl_listview_content_get(void *data, Evas_Object *obj, const evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_progressbar_pulse(icon, TRUE); evas_object_propagate_events_set(icon, EINA_FALSE); - } else if (wifi_get_ug_type() != UG_VIEW_OOBE) { + } else if (ug_type != UG_VIEW_OOBE) { btn = elm_button_add(obj); elm_object_style_set(btn, "circle_custom"); icon = elm_image_add(btn); - elm_image_file_set(icon, CUSTOM_EDITFIELD_PATH, "wifi_icon_badge_info.png"); elm_image_resizable_set(icon, EINA_TRUE, EINA_TRUE); + elm_image_file_set(icon, CUSTOM_EDITFIELD_PATH, "wifi_icon_badge_info.png"); elm_object_part_content_set(btn, "elm.swallow.content", icon); evas_object_propagate_events_set(btn, EINA_FALSE); - evas_object_smart_callback_add(btn, "clicked", _gl_listview_more_btn_cb, gdata->device_info); + evas_object_smart_callback_add(btn, "clicked", + _gl_listview_more_btn_cb, gdata->device_info); evas_object_show(btn); return btn; @@ -1025,7 +1028,9 @@ Evas_Object* viewer_list_create(Evas_Object *win) viewer_list = elm_genlist_add(win); assertm_if(NULL == viewer_list, "NULL!!"); - if (wifi_get_ug_type() == UG_VIEW_OOBE) { + int ug_type = wifi_get_ug_type(); + + if (ug_type == UG_VIEW_OOBE) { elm_object_style_set(viewer_list, "solid/default"); elm_object_color_class_color_set(viewer_list, "bg", 255, 255, 255, 255); } @@ -1052,7 +1057,6 @@ Evas_Object* viewer_list_create(Evas_Object *win) no_wifi_device_itc->func.state_get = NULL; no_wifi_device_itc->func.del = _gl_listview_del; - int ug_type = wifi_get_ug_type(); if (ug_type == UG_VIEW_OOBE) { last_item_itc = elm_genlist_item_class_new(); last_item_itc->item_style = g_genlist_info[WIFI_GENLIST_1LINE_STYLE].style_name;