diff options
author | Jihoon Kim <jihoon48.kim@samsung.com> | 2019-08-05 16:28:13 +0900 |
---|---|---|
committer | Jihoon Kim <jihoon48.kim@samsung.com> | 2019-08-05 16:28:13 +0900 |
commit | 33983747b8ce73275d77894ef8000022d5bc296e (patch) | |
tree | 8cbd5784e021da395076b138bc55fa3af1fdb937 | |
parent | f4ed795a5b9106d2d8378fc8d5b2e8cf8d26251c (diff) | |
download | autofill-setting-33983747b8ce73275d77894ef8000022d5bc296e.tar.gz autofill-setting-33983747b8ce73275d77894ef8000022d5bc296e.tar.bz2 autofill-setting-33983747b8ce73275d77894ef8000022d5bc296e.zip |
Apply circle UI in agreement popup
Change-Id: I6737bd8848b3d6d8571779de335f4dfbee1b59c4
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | res/images/tw_ic_popup_btn_check.png | bin | 0 -> 1392 bytes | |||
-rw-r--r-- | res/images/tw_ic_popup_btn_delete.png | bin | 0 -> 1184 bytes | |||
-rw-r--r-- | src/autofill_setting_list_ui.cpp | 26 |
4 files changed, 25 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7472468..a662890 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,4 +61,7 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} "-pie") INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${TZ_SYS_RO_APP}/org.tizen.${PROJECT_NAME}/bin) INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PKGNAME}.xml DESTINATION ${TZ_SYS_RO_PACKAGES}) +FILE(GLOB_RECURSE DEFAULT_IMAGES "${CMAKE_CURRENT_SOURCE_DIR}/res/images/*.png") +INSTALL(FILES ${DEFAULT_IMAGES} DESTINATION ${RESDIR}/images) + ADD_SUBDIRECTORY(po) diff --git a/res/images/tw_ic_popup_btn_check.png b/res/images/tw_ic_popup_btn_check.png Binary files differnew file mode 100644 index 0000000..f20f62e --- /dev/null +++ b/res/images/tw_ic_popup_btn_check.png diff --git a/res/images/tw_ic_popup_btn_delete.png b/res/images/tw_ic_popup_btn_delete.png Binary files differnew file mode 100644 index 0000000..5f346cb --- /dev/null +++ b/res/images/tw_ic_popup_btn_delete.png diff --git a/src/autofill_setting_list_ui.cpp b/src/autofill_setting_list_ui.cpp index bfc14cb..0670fe5 100644 --- a/src/autofill_setting_list_ui.cpp +++ b/src/autofill_setting_list_ui.cpp @@ -34,6 +34,8 @@ #define AUTOFILL_SETTING_LIST_POPUP_CANCEL dgettext(PACKAGE, "IDS_COM_SK_CANCEL_ABB") #define AUTOFILL_SETTING_LIST_POPUP_TEXT dgettext(PACKAGE, "IDS_AUTOFILL_WILL_BE_ABLE_TO_SEE_WHATS_ON_YOUR_SCREEN_IN_ALL_APPS_TO_DETERMINE") +#define ICON_DIR RESDIR"/images" + static Evas_Object *group_radio = NULL; static autofill_manager_h g_amh = NULL; @@ -268,30 +270,46 @@ static void autofill_setting_list_show_popup(void *data, Evas_Object *obj, popup } Evas_Object *top_widget = elm_object_top_widget_get(obj); + Evas_Object *popup = elm_popup_add(top_widget); elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0); - elm_object_part_text_set(popup, "title,text", AUTOFILL_SETTING_LIST_MAKE_SURE_TRUST); + elm_object_domain_translatable_part_text_set(popup, "title,text", PACKAGE, AUTOFILL_SETTING_LIST_MAKE_SURE_TRUST); + elm_object_style_set(popup, "circle"); char chFormatMsg[1024] = {'\0'}; char chPopupMsg[1024] = {'\0'}; snprintf(chFormatMsg, sizeof(chFormatMsg), "%s", AUTOFILL_SETTING_LIST_POPUP_TEXT); snprintf(chPopupMsg, sizeof(chPopupMsg), chFormatMsg, g_autofill_list[index].label.c_str()); - elm_object_text_set(popup, chPopupMsg); + + Evas_Object *layout = elm_layout_add(popup); + elm_layout_theme_set(layout, "layout", "popup", "content/circle/buttons2"); + elm_object_domain_translatable_part_text_set(layout, "elm.text", PACKAGE, chPopupMsg); + elm_object_content_set(popup, layout); popup_cb_data *cb_data = new popup_cb_data; cb_data->popup = popup; cb_data->data = data; Evas_Object *btn_cancel = elm_button_add(popup); - elm_object_text_set(btn_cancel, AUTOFILL_SETTING_LIST_POPUP_CANCEL); + elm_object_style_set(btn_cancel, "popup/circle/left"); elm_object_part_content_set(popup, "button1", btn_cancel); evas_object_smart_callback_add(btn_cancel, "clicked", ime_setting_list_cancel_callback, cb_data); + Evas_Object *icon = elm_image_add(btn_cancel); + elm_image_file_set(icon, ICON_DIR"/tw_ic_popup_btn_delete.png", NULL); + evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_part_content_set(btn_cancel, "elm.swallow.content", icon); + Evas_Object *btn_ok = elm_button_add(popup); - elm_object_text_set(btn_ok, AUTOFILL_SETTING_LIST_POPUP_OK); + elm_object_style_set(btn_ok, "popup/circle/right"); elm_object_part_content_set(popup, "button2", btn_ok); evas_object_smart_callback_add(btn_ok, "clicked", ime_setting_list_ok_callback, cb_data); + icon = elm_image_add(btn_ok); + elm_image_file_set(icon, ICON_DIR"/tw_ic_popup_btn_check.png", NULL); + evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_part_content_set(btn_ok, "elm.swallow.content", icon); + eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, _popup_back_cb, cb_data); evas_object_event_callback_add(popup, EVAS_CALLBACK_DEL, _popup_del_cb, cb_data); evas_object_show(popup); |