From: Nibha Sharma Date: Tue, 8 Sep 2020 04:50:59 +0000 (+0530) Subject: [TBT][input/common][Non-ACR][TSIX-6146 Instruction guide allignment is corrected... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f117e12e036903374ef3f1ea5c05545a4bfa9ef;p=test%2Ftct%2Fnative%2Fbehavior.git [TBT][input/common][Non-ACR][TSIX-6146 Instruction guide allignment is corrected and TSIX-6143 enter key not working issue fixed] Change-Id: I6493069fa846c5936f20a82ac7f361bc3a7e1599 Signed-off-by: Nibha Sharma --- diff --git a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk index e204a92..3aa219e 100755 Binary files a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk and b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk differ diff --git a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk index b9faa06..563d595 100755 Binary files a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk and b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-x86.tpk differ diff --git a/tbtcoreapp/inc/utils/ui-utils.h b/tbtcoreapp/inc/utils/ui-utils.h index 5e328b4..826a048 100644 --- a/tbtcoreapp/inc/utils/ui-utils.h +++ b/tbtcoreapp/inc/utils/ui-utils.h @@ -154,6 +154,14 @@ Evas_Object *ui_utils_layout_add(Evas_Object *parent, Evas_Object_Event_Cb destr */ Evas_Object * ui_utils_popup_button_add(Evas_Object *popup, const char *text, Evas_Smart_Cb func, void *data); +/* + * @brief Add toolbar widget + * @since_tizen 2.3 + * @param[in] parent Parent widget + * @return Toolbar on success, otherwise NULL + */ +Evas_Object *ui_utils_popup_title_text_add(Evas_Object *parent, const char *title, const char *text); + /* * @brief Add toolbar widget * @since_tizen 2.3 diff --git a/tbtcoreapp/src/utils/ui-utils.c b/tbtcoreapp/src/utils/ui-utils.c index 5a9f262..aaa01ab 100644 --- a/tbtcoreapp/src/utils/ui-utils.c +++ b/tbtcoreapp/src/utils/ui-utils.c @@ -272,13 +272,46 @@ Evas_Object *ui_utils_popup_add(Evas_Object *parent, const char *text) Evas_Object *popup = elm_popup_add(parent); RETVM_IF(NULL == popup, NULL, "popup is not created"); - elm_object_part_text_set(popup, PART_POPUP_TITLE, text); + elm_object_style_set(popup, "circle"); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + Evas_Object *layout = elm_layout_add(popup); + elm_layout_theme_set(layout, "layout", "popup", "content/circle"); + elm_object_part_text_set(layout, "elm.text.title",text); + elm_object_content_set(popup, layout); evas_object_show(popup); eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, _eext_popup_back_cb, parent); return popup; } +/** + * @function ui_utils_popup_title_text_add + * @since_tizen 2.3 + * @description Ui Utils Popup Add + * @parameter Evas_Object*: Evas Object Pointer, const char*: Const char Pointer , const char*: Const char Pointer + * @return Evas_Object* + */ +Evas_Object *ui_utils_popup_title_text_add(Evas_Object *parent, const char *title, const char *text) +{ + RETVM_IF(NULL == parent, NULL, "popup is null"); + + Evas_Object *popup = elm_popup_add(parent); + RETVM_IF(NULL == popup, NULL, "popup is not created"); + + elm_object_style_set(popup, "circle"); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + + Evas_Object *layout = elm_layout_add(popup); + elm_layout_theme_set(layout, "layout", "popup", "content/circle"); + elm_object_part_text_set(layout, "elm.text.title",title); + elm_object_part_text_set(layout, "elm.text",text); + elm_object_content_set(popup, layout); + evas_object_show(popup); + eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, _eext_popup_back_cb, parent); + + return popup; +} /** * @function ui_utils_popup_button_add @@ -310,8 +343,9 @@ Evas_Object * ui_utils_popup_button_add(Evas_Object *popup, const char *text, Ev button = elm_button_add(popup); RETVM_IF(NULL == button, NULL, "Failed to create button"); - elm_object_style_set(button, STYLE_POPUP_BUTTON); + elm_object_style_set(button, "popup/circle"); elm_object_text_set(button, ui_utils_text_add(text, NULL)); + evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_object_part_content_set(popup, *part, button); evas_object_smart_callback_add(button, EVENT_CLICKED, func, data); @@ -550,12 +584,11 @@ void ui_utils_show_toast(const char* message, const Evas_Object* data, float tim */ void ui_utils_guide_instruction_popup_button(const Evas_Object* view, const char* txtInstruction) { - RETM_IF(NULL == view, "view is NULL"); + RETM_IF(NULL == view, "view is NULL"); - Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide"); - RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL"); + Evas_Object *popup = ui_utils_popup_title_text_add(view,"Instruction Guide",txtInstruction); + RETM_IF(NULL == popup,"popup is NULL"); - elm_object_text_set(guide_popup_btn, txtInstruction); - ui_utils_popup_button_add(guide_popup_btn, caption_ok, guide_pop_up_button_callback, guide_popup_btn); + ui_utils_popup_button_add(popup, caption_ok, guide_pop_up_button_callback, popup); } diff --git a/tbtcoreapp/src/view/tbt-common-view.c b/tbtcoreapp/src/view/tbt-common-view.c index 2c358e5..c39936c 100644 --- a/tbtcoreapp/src/view/tbt-common-view.c +++ b/tbtcoreapp/src/view/tbt-common-view.c @@ -472,10 +472,8 @@ switch(item_index) static void toolbar_item_info_popup(common_view *view) { RETM_IF(NULL == view, "view is NULL"); - - Evas_Object *popup = ui_utils_popup_add(view->navi, toolbar_item_names[TOOLBAR_ITEM_INDEX_INFO]); + Evas_Object *popup = ui_utils_popup_title_text_add(view->navi, toolbar_item_names[TOOLBAR_ITEM_INDEX_INFO],view->tbt_info->info); RETM_IF(NULL == popup, "popup is not created"); - elm_object_text_set(popup, view->tbt_info->info); ui_utils_popup_button_add(popup, caption_ok, _toolbar_item_popup_destroy_cb, popup); } diff --git a/tbtcoreapp/src/view/tbt-input-view.c b/tbtcoreapp/src/view/tbt-input-view.c index 0bec03a..7e0008d 100644 --- a/tbtcoreapp/src/view/tbt-input-view.c +++ b/tbtcoreapp/src/view/tbt-input-view.c @@ -85,7 +85,7 @@ input_view *input_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Ite elm_object_part_text_set(this->input_text, PART_ENTRY_GUIDE, "Enter IP:"); } - + elm_entry_single_line_set(this->input_text, EINA_FALSE); elm_object_part_content_set(this->view->layout, "1cnt", this->input_text); Elm_Input_Panel_Layout l;