iot common: modify some details 28/240228/2
authorSeonah Moon <seonah1.moon@samsung.com>
Tue, 4 Aug 2020 11:46:34 +0000 (20:46 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Thu, 6 Aug 2020 05:39:17 +0000 (14:39 +0900)
- Move on&off button to the left
- Move ctxpopup to top right-hand

Change-Id: I2b16927e594c9bcecdd0989602af9710447a71e4

packaging/wifi-efl-ug.spec
ui-gadget/viewer_manager.c

index 7ee0fa9..5d8ffcd 100644 (file)
@@ -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
index c6ec11b..95302a3 100644 (file)
@@ -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);