From: Nibha Sharma Date: Fri, 26 Jun 2020 08:24:23 +0000 (+0530) Subject: [TBT][camera][Non-ACR][TFDF-10670, Fixed popup content no coming properly issue ] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5e3f3ba0df8119af8e07e8e4fc4c18e3b33e570;p=test%2Ftct%2Fnative%2Fbehavior.git [TBT][camera][Non-ACR][TFDF-10670, Fixed popup content no coming properly issue ] Change-Id: I3f444060cdd8208caab6c3ffee2f1469d1e2c31c 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 32cb2dc..154bac5 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 863309a..65f3de8 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 old mode 100644 new mode 100755 index 5e328b4..2dead05 --- a/tbtcoreapp/inc/utils/ui-utils.h +++ b/tbtcoreapp/inc/utils/ui-utils.h @@ -170,6 +170,14 @@ Evas_Object *ui_utils_toolbar_add(Evas_Object *parent); */ Evas_Object *ui_utils_popup_add(Evas_Object *parent, const char *text); +/* + * @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 old mode 100644 new mode 100755 index 5a9f262..eecf4bc --- 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,10 @@ 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"); - - Evas_Object *guide_popup_btn = ui_utils_popup_add(view, "Instruction Guide"); - RETM_IF(NULL == guide_popup_btn, "guide_popup_btn is NULL"); + RETM_IF(NULL == view, "view 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 old mode 100644 new mode 100755 index 2c358e5..cd1243a --- a/tbtcoreapp/src/view/tbt-common-view.c +++ b/tbtcoreapp/src/view/tbt-common-view.c @@ -473,9 +473,8 @@ 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); }