return elm_object_item_part_content_get(navi_it, "title_right_btn");
}
-// For IoT Common profile.
-Evas_Object *viewer_maanger_create_scan_list_btn(Evas_Object *parent)
-{
- Evas_Object *btn = elm_button_add(parent);
- if (!btn)
- return NULL;
-
- elm_object_style_set(btn, "border");
- elm_object_domain_translatable_text_set(btn, PACKAGE,
- "IDS_WIFI_BUTTON_SCAN");
- evas_object_smart_callback_add(btn, "clicked", __refresh_scan_callback, NULL);
-
- return btn;
-}
-
int viewer_manager_create_scan_btn(void)
{
__COMMON_FUNC_ENTER__;
if (ug_app_state->ug_type == UG_VIEW_SETUP_WIZARD
|| ug_app_state->ug_type == UG_VIEW_OOBE
- || ug_app_state->ug_type == UG_VIEW_IOT_COMMON
|| manager_object->scan_button) {
__COMMON_FUNC_EXIT__;
return 0;
}
- Evas_Object *btn = elm_button_add(manager_object->nav);
- /* Use "bottom" style button */
+
+ Evas_Object *box = NULL;
+ Evas_Object *btn = NULL;
+ const char *btn_style = ug_app_state->ug_type == UG_VIEW_IOT_COMMON ? "border" : "bottom";
+
+ box = elm_box_add(manager_object->nav);
+ if (!box) {
+ ERROR_LOG(UG_NAME_NORMAL, "Error creating box");
+ return -1;
+ }
+
+ btn = elm_button_add(box);
if (!btn) {
ERROR_LOG(UG_NAME_NORMAL, "Error creating toolbar");
return -1;
}
- elm_object_style_set(btn, "bottom");
+
+ elm_object_style_set(btn, btn_style);
+ evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+ if (ug_app_state->ug_type == UG_VIEW_IOT_COMMON)
+ evas_object_size_hint_padding_set(btn, 40, 40, 0, 40);
+
elm_object_domain_translatable_text_set(btn, PACKAGE,
"IDS_WIFI_BUTTON_SCAN");
evas_object_smart_callback_add(btn, "clicked", __refresh_scan_callback, NULL);
- /* Set button into "toolbar" swallow part */
- elm_object_item_part_content_set(manager_object->navi_it, "toolbar", btn);
+ /* Set box into "toolbar" swallow part */
+ elm_object_item_part_content_set(manager_object->navi_it, "toolbar", box);
manager_object->scan_button = btn;
evas_object_show(manager_object->scan_button);
+
+ elm_box_pack_end(box, btn);
+
__COMMON_FUNC_EXIT__;
return 0;
}
return icon;
}
-static Evas_Object *_gl_scan_button_content_get(void *data, Evas_Object *obj,
- const char *part)
-{
- if (!obj)
- return NULL;
-
- Evas_Object *layout = NULL;
- Evas_Object *btn = NULL;
-
- layout = elm_layout_add(obj);
- if (!layout)
- return NULL;
-
- elm_layout_file_set(layout, CUSTOM_GENLIST_PATH, "gl_custom_list_button_item");
- btn = viewer_maanger_create_scan_list_btn(layout);
- elm_object_part_content_set(layout, "elm.swallow.content", btn);
-
- return layout;
-}
-
Elm_Object_Item* viewer_list_get_first_item(void)
{
return first_item;
last_item_itc->func.text_get = _gl_hidden_network_text_get;
last_item_itc->func.content_get = _gl_hidden_network_content_get;
last_item_itc->func.del = NULL;
- } else if (ug_type == UG_VIEW_IOT_COMMON) {
- last_item_itc = elm_genlist_item_class_new();
- last_item_itc->item_style = g_genlist_info[WIFI_GENLIST_FULL_STYLE].style_name;
- last_item_itc->func.text_get = NULL;
- last_item_itc->func.content_get = _gl_scan_button_content_get;
- last_item_itc->func.del = NULL;
}
first_item = last_item = NULL;