From: Seonah Moon Date: Tue, 4 Aug 2020 11:46:34 +0000 (+0900) Subject: iot common: modify some details X-Git-Tag: accepted/tizen/unified/20200807.141032~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F28%2F240228%2F2;p=apps%2Fnative%2Fug-wifi-efl.git iot common: modify some details - Move on&off button to the left - Move ctxpopup to top right-hand Change-Id: I2b16927e594c9bcecdd0989602af9710447a71e4 --- diff --git a/packaging/wifi-efl-ug.spec b/packaging/wifi-efl-ug.spec index 7ee0fa9..5d8ffcd 100644 --- a/packaging/wifi-efl-ug.spec +++ b/packaging/wifi-efl-ug.spec @@ -1,6 +1,6 @@ Name: wifi-efl-ug Summary: Wi-Fi UI Gadget for TIZEN -Version: 1.0.249 +Version: 1.1.0 Release: 1 Group: App/Network License: Flora-1.1 diff --git a/ui-gadget/viewer_manager.c b/ui-gadget/viewer_manager.c index c6ec11b..95302a3 100644 --- a/ui-gadget/viewer_manager.c +++ b/ui-gadget/viewer_manager.c @@ -450,6 +450,13 @@ static void _ctxpopup_move(Evas_Object *parent) __COMMON_FUNC_EXIT__; } +static void _ctxpopup_move_to_button(Evas_Object *ctxpopup, Evas_Object *btn) +{ + Evas_Coord x, y, w, h; + evas_object_geometry_get(btn, &x, &y, &w, &h); + evas_object_move(ctxpopup, x + (w / 2), y + h); +} + static void _ctxpopup_dismissed_cb(void *data, Evas_Object *obj, void *event_info) { @@ -596,7 +603,11 @@ static void _more_button_cb(void *data, Evas_Object *obj, void *event_info) ELM_CTXPOPUP_DIRECTION_UP, ELM_CTXPOPUP_DIRECTION_UNKNOWN, ELM_CTXPOPUP_DIRECTION_UNKNOWN, ELM_CTXPOPUP_DIRECTION_UNKNOWN); - _ctxpopup_move(_win_main); + if (wifi_get_ug_type() == UG_VIEW_IOT_COMMON) + _ctxpopup_move_to_button(manager_object->ctxpopup, obj); + else + _ctxpopup_move(_win_main); + evas_object_show(manager_object->ctxpopup); } @@ -747,9 +758,12 @@ static Evas_Object *_gl_wifi_onoff_content_get(void *data, Evas_Object *c = NULL; int ug_type = GPOINTER_TO_INT(data); const char *style; + const char *content_part = (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; // On&Off toggle button - if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_content_part, part)) { + if (!strcmp(content_part, part)) { if (ug_type == UG_VIEW_OOBE) style = "onoff"; else @@ -1089,7 +1103,7 @@ static void __viewer_manager_create_wifi_ug_content(Evas_Object *layout, edje_object_signal_emit(elm_layout_edje_get(layout), "elm,bg,show,group_list", "elm"); } - __viewer_manager_wifi_onoff_item_create(manager_object->list, UG_VIEW_DEFAULT); + __viewer_manager_wifi_onoff_item_create(manager_object->list, ug_type); __viewer_manager_onoff_description_item_create(); elm_object_part_content_set(layout, "elm.swallow.content", manager_object->list);