static gboolean keypad_state = FALSE;
extern genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
+extern content_size_info_t g_content_size_info;
static void __popup_entry_changed_cb(void* data, Evas_Object* obj, void* event_info)
{
elm_image_file_set(icon, CUSTOM_EDITFIELD_PATH, "wifi_icon_wps.png");
evas_object_color_set(icon, 2, 61, 132, 153);
- evas_object_size_hint_min_set(icon, DEFAULT_BUTTON_CIRCLE_SIZE, DEFAULT_BUTTON_CIRCLE_SIZE);
+ evas_object_size_hint_min_set(icon,
+ g_content_size_info.icon_w,
+ g_content_size_info.icon_h);
}
return icon;
}
#define FEATURE_TAG "platform"
#define MODEL_CONFIG_TAG "model-config"
+/* Icon Size*/
+#define BUTTON_CIRCLE_SIZE 40
+#define COMMON_BUTTON_CIRCLE_SIZE 30
+#define OOBE_BUTTON_CIRCLE_SIZE_H 33
+#define OOBE_BUTTON_CIRCLE_SIZE_W 45
+
+/* Font Size */
+#define SMALL_FONT_SIZE 28
+#define MID_FONT_SIZE 30
+#define BIG_FONT_SIZE 32
+#define COMMON_SMALL_FONT_SIZE 18
+#define COMMON_BIG_FONT_SIZE 22
+#define OOBE_SMALL_FONT_SIZE 16
+#define OOBE_MID_FONT_SIZE 18
+#define OOBE_BIG_FONT_SIZE 20
+
+/* Progress bar */
+#define PROGRESS_SMALL "process_small"
+#define PROGRESS_MID "process_medium"
+
typedef enum {
TIZEN_MODEL_UNKNOWN = 0,
TIZEN_MODEL_EMULATOR = 0x1,
guint subscribe_id_supplicant;
};
-#if 0
-// not used at this moment 06/15/2018
-static struct gdbus_connection_data gdbus_conn = { NULL, 0 };
-#endif
static GSList *managed_idler_list = NULL;
static int (*rotate_cb)(enum appcore_rm, void*, Eina_Bool, Eina_Bool) = NULL;
static void *rotate_cb_data = NULL;
static Ecore_Timer *scan_update_timer = NULL;
genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
+content_size_info_t g_content_size_info;
static char *__common_utils_2line_text_get(void *data, Evas_Object *obj, const char *part)
{
_init_genlist_full_style();
}
+void common_util_update_content_size(void)
+{
+ if (g_ug_type == UG_VIEW_OOBE) {
+ g_content_size_info.small_font = OOBE_SMALL_FONT_SIZE;
+ g_content_size_info.mid_font = OOBE_MID_FONT_SIZE;
+ g_content_size_info.big_font = OOBE_BIG_FONT_SIZE;
+ g_content_size_info.icon_w = OOBE_BUTTON_CIRCLE_SIZE_H;
+ g_content_size_info.icon_h = OOBE_BUTTON_CIRCLE_SIZE_W;
+ g_content_size_info.progress = PROGRESS_MID;
+ } else if (g_ug_type == UG_VIEW_IOT_COMMON) {
+ g_content_size_info.small_font = COMMON_SMALL_FONT_SIZE;
+ g_content_size_info.mid_font = COMMON_SMALL_FONT_SIZE;
+ g_content_size_info.big_font = COMMON_BIG_FONT_SIZE;
+ g_content_size_info.icon_w = COMMON_BUTTON_CIRCLE_SIZE;
+ g_content_size_info.icon_h = COMMON_BUTTON_CIRCLE_SIZE;
+ g_content_size_info.progress = PROGRESS_SMALL;
+ } else {
+ g_content_size_info.small_font = SMALL_FONT_SIZE;
+ g_content_size_info.mid_font = MID_FONT_SIZE;
+ g_content_size_info.big_font = BIG_FONT_SIZE;
+ g_content_size_info.icon_w = BUTTON_CIRCLE_SIZE;
+ g_content_size_info.icon_h = BUTTON_CIRCLE_SIZE;
+ g_content_size_info.progress = PROGRESS_MID;
+ }
+}
+
void common_util_set_ug_type(UG_TYPE type)
{
g_ug_type = type;
const char *sub_content_part;
} genlist_info_t;
+typedef struct {
+ int small_font;
+ int mid_font;
+ int big_font;
+ int icon_w;
+ int icon_h;
+ const char *progress;
+} content_size_info_t;
+
//#if !defined TIZEN_WIFI_QS
//extern genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
//genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX] = {0, };
#define GENLIST_PART_ELM_TEXT_SUB "elm.text.sub"
#define GENLIST_PART_ELM_TEXT_SUB_END "elm.text.sub.end"
#define GENLIST_PART_ELM_TEXT_END "elm.text.end"
-#define GENLIST_PART_ELM_TEXT_MULTILINE "elm.text.MULTILINE"
+#define GENLIST_PART_ELM_TEXT_MULTILINE "elm.text.multiline"
#define GENLIST_PART_ELM_ICON "elm.icon"
#define GENLIST_PART_ELM_END "elm.end"
#define GENLIST_PART_ELM_SWALLOW_CONTENT "elm.swallow.content"
#define GENLIST_PART_ELM_SWALLOW_ICON "elm.swallow.icon"
#define GENLIST_PART_ELM_SWALLOW_END "elm.swallow.end"
-/* Icon Size*/
-#define DEFAULT_BG_SIZE 60
-#define DEFAULT_BUTTON_CIRCLE_SIZE 40
-#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,
UG_VIEW_SETUP_WIZARD,
bool is_common_profile(void);
void common_util_update_genlist_style(void);
+void common_util_update_content_size(void);
void common_util_set_ug_type(UG_TYPE type);
UG_TYPE common_util_get_ug_type(void);
static void _ctxpopup_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
extern genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
+extern content_size_info_t g_content_size_info;
static void __back_btn_cb(void *data, Evas_Object *obj, void *event_info)
{
elm_image_file_set(icon, CUSTOM_EDITFIELD_PATH, temp_str);
g_free(temp_str);
- evas_object_size_hint_min_set(icon, ELM_SCALE_SIZE(DEFAULT_BUTTON_CIRCLE_SIZE), ELM_SCALE_SIZE(DEFAULT_BUTTON_CIRCLE_SIZE));
+ evas_object_size_hint_min_set(icon,
+ ELM_SCALE_SIZE(g_content_size_info.icon_w),
+ ELM_SCALE_SIZE(g_content_size_info.icon_h));
}
return icon;
Elm_Object_Item *navi_it = NULL;
Evas_Object *list = NULL;
Evas_Object *layout;
- wifi_manager_connection_state_e state;
_detail_data = (view_detail_data *)data;
PACKAGE, list, __view_detail_imf_ctxt_evnt_cb, navi_it);
/* Append forget button */
- wifi_manager_ap_get_connection_state(_detail_data->ap, &state);
- if (state == WIFI_MANAGER_CONNECTION_STATE_CONNECTED)
- __view_detail_add_forget_button(list, _detail_data);
+ if (ug_app_state->ug_type == UG_VIEW_IOT_COMMON) {
+ wifi_manager_connection_state_e state;
+ wifi_manager_ap_get_connection_state(_detail_data->ap, &state);
+ if (state == WIFI_MANAGER_CONNECTION_STATE_CONNECTED)
+ __view_detail_add_forget_button(list, _detail_data);
+ }
if (_detail_data && _detail_data->btn)
elm_object_disabled_set(_detail_data->btn, EINA_FALSE);
static void viewer_manager_hidden_confirm_cleanup(void);
extern genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
+extern content_size_info_t g_content_size_info;
#ifdef MODEL_BUILD_FEATURE_WLAN_CONCURRENT_MODE
static void _launch_wifi_direct_app(void)
if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part)) {
if (ug_type == UG_VIEW_OOBE) {
det = g_strdup_printf("<font_size=%d>%s</font_size>",
- OOBE_MID_FONT_SIZE,
+ g_content_size_info.mid_font,
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);
}
-
}
return det;
return det;
}
+static char *_gl_helper_content_get(void *data, Evas_Object *obj, const char *part)
+{
+ retvm_if(NULL == manager_object, NULL);
+
+ Evas_Object *box, *top_padding, *label;
+ char* det = g_strdup_printf("<align=center><font_size=%d>%s</font_size></align>",
+ g_content_size_info.big_font,
+ manager_object->item_onoff_description_text);
+
+ assertm_if(NULL == det, "NULL!!");
+
+ box = elm_box_add(obj);
+ elm_box_horizontal_set(box, EINA_FALSE);
+
+ top_padding = evas_object_rectangle_add(evas_object_evas_get(obj));
+ evas_object_size_hint_min_set(top_padding, ELM_SCALE_SIZE(40), ELM_SCALE_SIZE(50));
+ evas_object_size_hint_max_set(top_padding, ELM_SCALE_SIZE(40), ELM_SCALE_SIZE(50));
+ evas_object_color_set(top_padding, 0, 0, 0, 0);
+ evas_object_show(top_padding);
+ elm_box_pack_end(box, top_padding);
+
+ label = elm_label_add(box);
+ elm_object_text_set(label, det);
+ evas_object_show(label);
+ elm_box_pack_end(box, label);
+
+ return box;
+}
+
static Evas_Object *_gl_wifi_onoff_content_get(void *data,
Evas_Object *obj, const char *part)
{
{
__COMMON_FUNC_ENTER__;
- manager_object->item_onoff_description_text = g_strdup(sc(PACKAGE, I18N_TYPE_Turn_on_wifi_to_view_available_networks));
+ manager_object->item_onoff_description_text = g_strdup(sc(PACKAGE,
+ I18N_TYPE_Turn_on_wifi_to_view_available_networks));
+
+ if (wifi_get_ug_type() != UG_VIEW_IOT_COMMON) {
+ onoff_description_itc.item_style = g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].style_name;
+ onoff_description_itc.func.text_get = _gl_helper_text_get;
+ onoff_description_itc.func.content_get = NULL;
+ } else {
+ onoff_description_itc.item_style = g_genlist_info[WIFI_GENLIST_FULL_STYLE].style_name;
+ onoff_description_itc.func.text_get = NULL;
+ onoff_description_itc.func.content_get = _gl_helper_content_get;
+ }
- onoff_description_itc.item_style = g_genlist_info[WIFI_GENLIST_MULTILINE_STYLE].style_name;
- onoff_description_itc.func.text_get = _gl_helper_text_get;
- onoff_description_itc.func.content_get = NULL;
onoff_description_itc.func.state_get = NULL;
onoff_description_itc.func.del = NULL;
#include "appcoreWrapper.h"
#include "i18nmanager.h"
-#define LIST_ITEM_CONNECTED_AP_FONT_SIZE 28
-
static Evas_Object* viewer_list = NULL;
static Elm_Object_Item* first_item = NULL;
static Elm_Object_Item* last_item = NULL;
static struct connecting_cancel_popup_data *g_disconnect_popup = NULL;
extern genlist_info_t g_genlist_info[WIFI_GENLIST_STYLE_MAX];
+extern content_size_info_t g_content_size_info;
static void _gl_listview_more_btn_cb(void *data, Evas_Object *obj, void *event_info)
{
ug_genlist_data_t* gdata = (ug_genlist_data_t*) data;
retvm_if(NULL == gdata || NULL == gdata->device_info, NULL);
-
assertm_if(NULL == gdata->device_info->ssid, "NULL!!");
if (!strcmp(g_genlist_info[WIFI_GENLIST_2LINE_STYLE].text_part, part)) {
if (ug_type != UG_VIEW_OOBE && VIEWER_ITEM_RADIO_MODE_CONNECTED == gdata->radio_mode) {
convertedColor = ConvertRGBAtoHex(61, 185, 204, 255);
- buf = g_strdup_printf("<color=#%s>%s</color>",
- convertedColor, det);
-
+ buf = g_strdup_printf("<color=#%s><font_size=%d>%s</font_size></color>",
+ convertedColor, g_content_size_info.big_font, det);
g_free(det);
g_free(convertedColor);
return buf;
- } else if (wifi_get_ug_type() == UG_VIEW_OOBE) {
+ } else {
buf = g_strdup_printf("<font_size=%d>%s</font_size>",
- OOBE_BIG_FONT_SIZE, det);
+ g_content_size_info.big_font, det);
g_free(det);
return buf;
}
det = g_strdup(gdata->device_info->ap_status_txt);
assertm_if(NULL == det, "NULL!!");
- if (ug_type == UG_VIEW_OOBE)
- buf = g_strdup_printf("<font_size=%d>%s</font_size>",
- OOBE_SMALL_FONT_SIZE, det);
- else
- buf = g_strdup_printf("<font_size=%d>%s</font_size>",
- SMALL_FONT_SIZE, det);
+ buf = g_strdup_printf("<font_size=%d>%s</font_size>",
+ g_content_size_info.small_font, det);
g_free(det);
return buf;
}
elm_image_file_set(icon, CUSTOM_EDITFIELD_PATH, temp_str);
g_free(temp_str);
- if (wifi_get_ug_type() == UG_VIEW_OOBE) {
+ 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_WIDTH),
- ELM_SCALE_SIZE(DEFAULT_OOBE_BUTTON_CIRCLE_HEIGHT));
- } else {
+ else
evas_object_color_set(icon, 2, 61, 132, 204);
- evas_object_size_hint_min_set(icon, ELM_SCALE_SIZE(DEFAULT_BUTTON_CIRCLE_SIZE),
- ELM_SCALE_SIZE(DEFAULT_BUTTON_CIRCLE_SIZE));
- }
+
+ evas_object_size_hint_min_set(icon, ELM_SCALE_SIZE(g_content_size_info.icon_w),
+ ELM_SCALE_SIZE(g_content_size_info.icon_h));
} else if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].sub_content_part, part)) {
if (VIEWER_ITEM_RADIO_MODE_CONNECTING == gdata->radio_mode ||
VIEWER_ITEM_RADIO_MODE_CONFIGURATION == gdata->radio_mode) {
-
icon = elm_progressbar_add(obj);
-
- elm_object_style_set(icon, "process_medium");
+ elm_object_style_set(icon, g_content_size_info.progress);
evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_progressbar_pulse(icon, TRUE);
{
if (!strcmp(g_genlist_info[WIFI_GENLIST_1LINE_STYLE].text_part, part))
return g_strdup_printf("<font_size=%d>%s</font_size>",
- BIG_FONT_SIZE, sc(PACKAGE, I18N_TYPE_Find_Hidden_Network));
+ g_content_size_info.big_font, sc(PACKAGE, I18N_TYPE_Find_Hidden_Network));
return NULL;
}
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_WIDTH),
- ELM_SCALE_SIZE(DEFAULT_OOBE_BUTTON_CIRCLE_HEIGHT));
+ evas_object_size_hint_min_set(icon, ELM_SCALE_SIZE(g_content_size_info.icon_w),
+ ELM_SCALE_SIZE(g_content_size_info.icon_h));
}
return icon;
if (index == 1) // toggle button for wifi activation
elm_object_item_signal_emit(item, "elm,state,group,single", "elm");
+ else if (count == 2 && index == 2) // deactivated, description
+ elm_object_item_signal_emit(item, "elm,state,bottomline,hide", "elm");
else if (index == 3) // first AP
elm_object_item_signal_emit(item, "elm,state,group,top", "elm");
else if (index == count)
common_util_set_ug_type(ug_app_state->ug_type);
common_util_update_genlist_style();
+ common_util_update_content_size();
Evas_Object *parent_layout = ug_get_parent_layout(ug);
if (parent_layout == NULL) {
static struct connecting_cancel_popup_data *g_disconnect_popup = NULL;
extern wifi_object* devpkr_app_state;
+extern content_size_info_t g_content_size_info;
static Evas_Object* list = NULL;
static Elm_Genlist_Item_Class itc;
g_free(temp_str);
evas_object_color_set(icon, 2, 61, 132, 204);
- evas_object_size_hint_min_set(icon, DEFAULT_BUTTON_CIRCLE_SIZE, DEFAULT_BUTTON_CIRCLE_SIZE);
+ evas_object_size_hint_min_set(icon,
+ g_content_size_info.icon_w,
+ g_content_size_info.icon_h);
} else if (!strcmp("elm.swallow.end", part)) {
if (gdata->connection_mode == ITEM_CONNECTION_MODE_CONNECTING ||
else
common_util_set_ug_type(UG_VIEW_DEFAULT);
common_util_update_genlist_style();
+ common_util_update_content_size();
__COMMON_FUNC_EXIT__;
return true;
}