From 1838e00fb947c52897606171093febab122457a6 Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Thu, 20 Aug 2020 13:03:29 +0900 Subject: [PATCH] Adjust onoff button position for IOT common profile Change-Id: I9a12c2e8063f1282e4f6e49628ce50a796d93ed6 Signed-off-by: DoHyun Pyun --- standard/bt-main-view.c | 13 ++++++++++++- standard/bt-widget.h | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/standard/bt-main-view.c b/standard/bt-main-view.c index f25a103..4c6a711 100644 --- a/standard/bt-main-view.c +++ b/standard/bt-main-view.c @@ -125,12 +125,18 @@ static Evas_Object *__bt_main_onoff_icon_get(void *data, Evas_Object *obj, bt_ug_data *ugd = NULL; Evas_Object *btn = NULL; bool activated = false; + char *icon_part = NULL; retv_if(data == NULL, NULL); + if (TIZEN_COMMON) + icon_part = BT_GENLIST_ONOFF_ICON_PART_COMMON; + else + icon_part = BT_GENLIST_ONOFF_ICON_PART; + ugd = (bt_ug_data *)data; - if (!strcmp("elm.swallow.end", part) || !strcmp("elm.end", part)) { + if (!strcmp(icon_part, part)) { if (ugd->op_status == BT_ACTIVATING || ugd->op_status == BT_DEACTIVATING) { btn = elm_progressbar_add(obj); @@ -1773,6 +1779,11 @@ void _bt_main_add_device_name_item(bt_ug_data *ugd, Evas_Object *genlist) FN_START; retm_if(ugd->op_status == BT_DEACTIVATED, "BT is turned off"); + if (TIZEN_COMMON) { + /* IOT common UI don't show the device name */ + return; + } + Elm_Object_Item *git = NULL; /* Device name */ git = elm_genlist_item_insert_after(genlist, ugd->device_name_itc, ugd, NULL, diff --git a/standard/bt-widget.h b/standard/bt-widget.h index 8eff341..6b2306d 100644 --- a/standard/bt-widget.h +++ b/standard/bt-widget.h @@ -66,6 +66,9 @@ static inline char* get_genlist_style(bt_genlist_type_t type) #define BT_GENLIST_GROUP_INDEX_STYLE "group_index" #define BT_GENLIST_FULL_CONTENT_STYLE "full" +#define BT_GENLIST_ONOFF_ICON_PART "elm.swallow.end" +#define BT_GENLIST_ONOFF_ICON_PART_COMMON "elm.icon" + #define BT_POPUP_STR_MAX_LEN 512 Evas_Object *_bt_create_naviframe(Evas_Object *parent); -- 2.7.4