summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2020-10-16 10:30:46 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2020-10-16 10:30:46 +0900
commitc1f6ca5a3d981433aa52726d16764038009648a9 (patch)
tree6ce08ec04f9fb731591ec7bb1517dbaf887ec117
parente407619c6bdd8ad46c70731e79bb8b7b8165f17d (diff)
downloadautofill-setting-c1f6ca5a3d981433aa52726d16764038009648a9.tar.gz
autofill-setting-c1f6ca5a3d981433aa52726d16764038009648a9.tar.bz2
autofill-setting-c1f6ca5a3d981433aa52726d16764038009648a9.zip
Refactor code for resizing conformant
Change-Id: I8f308d03432cdd8f99322493a9afa2a6abf7fc43 Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
-rw-r--r--src/autofill_setting_list_ui.cpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/autofill_setting_list_ui.cpp b/src/autofill_setting_list_ui.cpp
index ece3d0d..7531750 100644
--- a/src/autofill_setting_list_ui.cpp
+++ b/src/autofill_setting_list_ui.cpp
@@ -353,19 +353,6 @@ static void autofill_setting_list_item_sel_cb(void *data, Evas_Object *obj, void
}
}
-static void
-_elm_win_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- Evas_Coord w = -1, h = -1;
- Evas_Object *conform = (Evas_Object*)data;
- if (conform) {
- evas_object_geometry_get(obj, NULL, NULL, &w, &h);
- if (w > 0 && h > 0) {
- evas_object_resize(conform, w, h);
- }
- }
-}
-
static Evas_Object *autofill_setting_list_conform_create(Evas_Object *parentWin)
{
Evas_Object *conform = elm_conformant_add(parentWin);
@@ -379,13 +366,9 @@ static Evas_Object *autofill_setting_list_conform_create(Evas_Object *parentWin)
elm_object_part_content_set(conform, "elm.swallow.indicator_bg", bg);
evas_object_show(bg);
- Evas_Coord w = -1, h = -1;
- elm_win_screen_size_get(parentWin, NULL, NULL, &w, &h);
- if (w > 0 && h > 0) {
- evas_object_resize(conform, w, h);
- }
- evas_object_event_callback_add(parentWin, EVAS_CALLBACK_RESIZE, _elm_win_resize_cb, conform);
+ elm_win_resize_object_add(parentWin, conform);
evas_object_show(conform);
+
return conform;
}