Modify the genlist text style for common profile 88/232688/3 accepted/tizen/unified/20200508.045109 submit/tizen/20200507.235830
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 7 May 2020 07:05:01 +0000 (16:05 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 7 May 2020 23:17:05 +0000 (08:17 +0900)
Change-Id: Iaf6694f19db426d44cae00b0e65ccd88050ce287
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
common/include/bt-util.h
common/include/bt-widget.h
common/src/ui/bt-main-view.c

index c768328..21593e3 100644 (file)
@@ -33,6 +33,7 @@ extern "C" {
 #include <Elementary.h>
 
 #include "bt-type-define.h"
+#include "bt-main-ug.h"
 
 /* Major Device Mask */
 #define MISCELLANEOUS_MAJOR_DEVICE_MASK (0x000000)
index eac96f7..91e0434 100644 (file)
@@ -31,13 +31,31 @@ extern "C" {
 #include "Elementary.h"
 #include <efl_extension.h>
 
-#define BT_GENLIST_1LINE_TEXT_STYLE "type1"
-#define BT_GENLIST_1LINE_TEXT_ICON_STYLE "type1"
-#define BT_GENLIST_2LINE_TOP_TEXT_STYLE "type1"
-#define BT_GENLIST_2LINE_TOP_TEXT_ICON_STYLE "type1"
-#define BT_GENLIST_2LINE_BOTTOM_TEXT_STYLE "type2"
-#define BT_GENLIST_2LINE_BOTTOM_TEXT_ICON_STYLE "type2"
-#define BT_GENLIST_MULTILINE_TEXT_STYLE "multiline"
+#include "bt-util.h"
+
+typedef enum {
+       BT_GENLIST_1LINE = 0,
+       BT_GENLIST_2LINE,
+       BT_GENLIST_MULTILINE,
+} bt_genlist_type_t;
+
+static inline char* get_genlist_style(bt_genlist_type_t type)
+{
+       if (type == BT_GENLIST_MULTILINE)
+               return TIZEN_COMMON ? "2line" : "multiline";
+       else if (type == BT_GENLIST_2LINE)
+               return TIZEN_COMMON ? "2line" : "type2";
+       else
+               return TIZEN_COMMON ? "1line" : "type1";
+}
+
+#define BT_GENLIST_1LINE_TEXT_STYLE get_genlist_style(BT_GENLIST_1LINE)
+#define BT_GENLIST_1LINE_TEXT_ICON_STYLE get_genlist_style(BT_GENLIST_1LINE)
+#define BT_GENLIST_2LINE_TOP_TEXT_STYLE get_genlist_style(BT_GENLIST_2LINE)
+#define BT_GENLIST_2LINE_TOP_TEXT_ICON_STYLE get_genlist_style(BT_GENLIST_2LINE)
+#define BT_GENLIST_2LINE_BOTTOM_TEXT_STYLE get_genlist_style(BT_GENLIST_2LINE)
+#define BT_GENLIST_2LINE_BOTTOM_TEXT_ICON_STYLE get_genlist_style(BT_GENLIST_2LINE)
+#define BT_GENLIST_MULTILINE_TEXT_STYLE get_genlist_style(BT_GENLIST_MULTILINE)
 #define BT_GENLIST_GROUP_INDEX_STYLE "group_index"
 #define BT_GENLIST_FULL_CONTENT_STYLE "full"
 
index add5a55..338b66b 100644 (file)
@@ -95,13 +95,20 @@ static char *__bt_main_onoff_label_get(void *data, Evas_Object *obj,
 
        if (!strcmp("elm.text", part)) {
                return g_strdup(BT_STR_BLUETOOTH);
-       } else if (!strcmp("elm.text.multiline", part)) {
+       } else if (!strcmp("elm.text.multiline", part) || !strcmp("elm.text.sub", part)) {
                char buf[1024] = {0,};
                if (ugd->op_status == BT_ACTIVATING) {
-                       snprintf(buf, sizeof(buf), "<font_size=30>%s</font_size>", BT_STR_TURNING_ON_BLUETOOTH);
+                       if (TIZEN_COMMON)
+                               snprintf(buf, sizeof(buf), "<font_size=15>%s</font_size>", BT_STR_TURNING_ON_BLUETOOTH);
+                       else
+                               snprintf(buf, sizeof(buf), "<font_size=30>%s</font_size>", BT_STR_TURNING_ON_BLUETOOTH);
                        return g_strdup(buf);
                } else if (ugd->op_status == BT_DEACTIVATED) {
-                       snprintf(buf, sizeof(buf), "<font_size=30>%s</font_size>", BT_STR_TURN_ON_BLUETOOTH_TO_SEE_A_LIST_OF_AVAILABLE_DEVICES);
+                       if (TIZEN_COMMON)
+                               snprintf(buf, sizeof(buf), "<font_size=15>%s</font_size>", BT_STR_TURN_ON_BLUETOOTH_TO_SEE_A_LIST_OF_AVAILABLE_DEVICES);
+                       else
+                               snprintf(buf, sizeof(buf), "<font_size=30>%s</font_size>", BT_STR_TURN_ON_BLUETOOTH_TO_SEE_A_LIST_OF_AVAILABLE_DEVICES);
+
                        return g_strdup(buf);
                }
        }