From 351a2007aa533f1d3a83c73766c41e0dd31af389 Mon Sep 17 00:00:00 2001 From: Cheoleun Moon Date: Wed, 28 Aug 2019 14:23:37 +0900 Subject: [PATCH] Implement OOBE view #4 - Set icon of WiFi as 33 px in height and 45 px in width - Set Font size of SSID, state and Wi-Fi teext in upper left corner Change-Id: I19db06091c173f86a7f870bf181e45cc6ac25e6b Signed-off-by: Cheoleun Moon --- CMakeLists.txt | 2 +- packaging/wifi-efl-ug.spec | 2 +- sources/libraries/Common/include/common.h | 6 +++++- sources/ui-gadget/include/viewer_list.h | 2 ++ sources/ui-gadget/viewers-layout/viewer_manager.c | 10 ++++++---- .../ui-gadget/viewers-layout/wifi_viewer_list.c | 22 ++++++++++++---------- 6 files changed, 27 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dfa2a57..3540a02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ pkg_check_modules(pkgs REQUIRED capi-network-connection capi-network-wifi-manager sensor - openssl1.1 + openssl cert-svc-vcore efl-extension aul diff --git a/packaging/wifi-efl-ug.spec b/packaging/wifi-efl-ug.spec index 30caf69..42a2823 100644 --- a/packaging/wifi-efl-ug.spec +++ b/packaging/wifi-efl-ug.spec @@ -12,7 +12,7 @@ BuildRequires: pkgconfig(ecore-input) BuildRequires: pkgconfig(appcore-efl) BuildRequires: pkgconfig(elementary) BuildRequires: pkgconfig(glib-2.0) -BuildRequires: pkgconfig(openssl1.1) +BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(cert-svc-vcore) BuildRequires: pkgconfig(ui-gadget-1) BuildRequires: pkgconfig(sensor) diff --git a/sources/libraries/Common/include/common.h b/sources/libraries/Common/include/common.h index d0b4dd5..a4c4604 100755 --- a/sources/libraries/Common/include/common.h +++ b/sources/libraries/Common/include/common.h @@ -97,12 +97,16 @@ extern "C" /* Icon Size*/ #define DEFAULT_BG_SIZE 60 #define DEFAULT_BUTTON_CIRCLE_SIZE 40 -#define DEFAULT_OOBE_BUTTON_CIRCLE_SIZE 20 +#define DEFAULT_OOBE_BUTTON_CIRCLE_HEIGHT 33 +#define DEFAULT_OOBE_BUTTON_CIRCLE_WIDTH 45 /* Font Size */ #define SMALL_FONT_SIZE 28 #define MID_FONT_SIZE 30 #define BIG_FONT_SIZE 32 +#define OOBE_SMALL_FONT_SIZE 16 +#define OOBE_MID_FONT_SIZE 18 +#define OOBE_BIG_FONT_SIZE 20 typedef enum { UG_VIEW_DEFAULT = 0, diff --git a/sources/ui-gadget/include/viewer_list.h b/sources/ui-gadget/include/viewer_list.h index 53704d3..e4e2e3e 100644 --- a/sources/ui-gadget/include/viewer_list.h +++ b/sources/ui-gadget/include/viewer_list.h @@ -61,6 +61,8 @@ void viewer_list_item_enable_all(void); void viewer_list_item_disable_all(void); ////////////////////////////////////////////////////////////////////////////////////////////////// +void viewer_list_item_hidden_network_set(Elm_Object_Item *item); + Elm_Object_Item *item_get_for_ap(wifi_manager_ap_h ap); Elm_Object_Item *item_get_for_ssid(const char *ssid); diff --git a/sources/ui-gadget/viewers-layout/viewer_manager.c b/sources/ui-gadget/viewers-layout/viewer_manager.c index a96d7e8..12f9d98 100755 --- a/sources/ui-gadget/viewers-layout/viewer_manager.c +++ b/sources/ui-gadget/viewers-layout/viewer_manager.c @@ -678,14 +678,16 @@ static char *_gl_wifi_onoff_text_get(void *data, Evas_Object *obj, const char *p retvm_if(NULL == manager_object, NULL); if (!strcmp("elm.text", part)) { - if (ug_type == UG_VIEW_OOBE - && manager_object->header_mode == HEADER_MODE_SEARCHING) { + if (ug_type == UG_VIEW_OOBE) { det = g_strdup_printf("%s", - SMALL_FONT_SIZE, sc(PACKAGE, I18N_TYPE_Scanning)); + OOBE_MID_FONT_SIZE, + manager_object->header_mode == HEADER_MODE_SEARCHING ? + sc(PACKAGE, I18N_TYPE_Scanning) : + manager_object->item_wifi_onoff_text); } else { det = g_strdup(manager_object->item_wifi_onoff_text); } - assertm_if(NULL == det, "NULL!!"); + } return det; diff --git a/sources/ui-gadget/viewers-layout/wifi_viewer_list.c b/sources/ui-gadget/viewers-layout/wifi_viewer_list.c index 7e8e286..1507daa 100755 --- a/sources/ui-gadget/viewers-layout/wifi_viewer_list.c +++ b/sources/ui-gadget/viewers-layout/wifi_viewer_list.c @@ -89,7 +89,7 @@ static char* _gl_listview_text_get(void *data, Evas_Object *obj, const char *par char* det = NULL; char* buf = NULL; char* convertedColor = NULL; - int ug_type; + int ug_type = wifi_get_ug_type(); ug_genlist_data_t* gdata = (ug_genlist_data_t*) data; retvm_if(NULL == gdata || NULL == gdata->device_info, NULL); @@ -102,8 +102,6 @@ static char* _gl_listview_text_get(void *data, Evas_Object *obj, const char *par assertm_if(NULL == det, "NULL!!"); assertm_if(NULL == convertedColor, "NULL!!"); - ug_type = wifi_get_ug_type(); - 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", @@ -114,7 +112,7 @@ static char* _gl_listview_text_get(void *data, Evas_Object *obj, const char *par return buf; } else if (wifi_get_ug_type() == UG_VIEW_OOBE) { buf = g_strdup_printf("%s", - BIG_FONT_SIZE, det); + OOBE_BIG_FONT_SIZE, det); g_free(det); return buf; } @@ -123,8 +121,12 @@ static char* _gl_listview_text_get(void *data, Evas_Object *obj, const char *par det = g_strdup(gdata->device_info->ap_status_txt); assertm_if(NULL == det, "NULL!!"); - buf = g_strdup_printf("%s", - SMALL_FONT_SIZE, det); + if (ug_type == UG_VIEW_OOBE) + buf = g_strdup_printf("%s", + OOBE_SMALL_FONT_SIZE, det); + else + buf = g_strdup_printf("%s", + SMALL_FONT_SIZE, det); g_free(det); return buf; } @@ -156,8 +158,8 @@ static Evas_Object *_gl_listview_content_get(void *data, Evas_Object *obj, const if (wifi_get_ug_type() == UG_VIEW_OOBE) { evas_object_color_set(icon, 0, 10, 10, 204); - evas_object_size_hint_min_set(icon, ELM_SCALE_SIZE(DEFAULT_OOBE_BUTTON_CIRCLE_SIZE), - ELM_SCALE_SIZE(DEFAULT_OOBE_BUTTON_CIRCLE_SIZE)); + evas_object_size_hint_min_set(icon, ELM_SCALE_SIZE(DEFAULT_OOBE_BUTTON_CIRCLE_WIDTH), + ELM_SCALE_SIZE(DEFAULT_OOBE_BUTTON_CIRCLE_HEIGHT)); } else { evas_object_color_set(icon, 2, 61, 132, 204); evas_object_size_hint_min_set(icon, ELM_SCALE_SIZE(DEFAULT_BUTTON_CIRCLE_SIZE), @@ -250,8 +252,8 @@ static Evas_Object *_gl_hidden_network_content_get(void *data, Evas_Object *obj, icon = elm_image_add(obj); retvm_if(NULL == icon, NULL); elm_image_file_set(icon, CUSTOM_EDITFIELD_PATH, "find_hidden_network.png"); - evas_object_size_hint_min_set(icon, ELM_SCALE_SIZE(DEFAULT_OOBE_BUTTON_CIRCLE_SIZE), - ELM_SCALE_SIZE(DEFAULT_OOBE_BUTTON_CIRCLE_SIZE)); + evas_object_size_hint_min_set(icon, ELM_SCALE_SIZE(DEFAULT_OOBE_BUTTON_CIRCLE_WIDTH), + ELM_SCALE_SIZE(DEFAULT_OOBE_BUTTON_CIRCLE_HEIGHT)); } return icon; -- 2.7.4