aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/elementary/test_popup.c
diff options
context:
space:
mode:
authorJinyong Park <j4939.park@samsung.com>2016-05-17 10:22:07 +0900
committerJaehwan Kim <jae.hwan.kim@samsung.com>2016-05-17 10:22:07 +0900
commit1b765359ee4603b3b1713ca6973cecc072617b72 (patch)
tree15c00e7cdad3db751fd376a81e92f2ef46f6bf20 /src/bin/elementary/test_popup.c
parentecore_imf/wayland: Change sequence to call preedit changed and end callback (diff)
downloadefl-1b765359ee4603b3b1713ca6973cecc072617b72.tar.gz
popup: add popup default scrollable flag config for other profiles.
Summary: The default scrollable flag of popup can be different in each profiles. So I added the scrollable configuration of popup. @feature Test Plan: 1. Before 1) elementary_test -to popup 2) resize window to smaller 3) Click 15th item, "popup-center-title + genlist content + 1 button" 4) Then popup will show, but its list is very long, only small part of popup could be shown. 2. After Patch 1) change "popup_scroller" value to 1 in base.src, then run elementary_test -to popup or ELM_POPUP_SCROLLABLE=1 elemantary_test -to popup 2) resize window to smaller 3) Click 15th item, "popup-center-title + genlist content + 1 button" 4) Then popup will show, popup's genlist will be in scroller, so entire popup can be shown. Reviewers: jaehwan, id213sin, cedric, raster, singh.amitesh, SanghyeonLee, Hermet Subscribers: Hermet, minkyu, herb, jpeg Differential Revision: https://phab.enlightenment.org/D3856
Diffstat (limited to 'src/bin/elementary/test_popup.c')
-rw-r--r--src/bin/elementary/test_popup.c41
1 files changed, 18 insertions, 23 deletions
diff --git a/src/bin/elementary/test_popup.c b/src/bin/elementary/test_popup.c
index 3ab08e1722..dc1274ec82 100644
--- a/src/bin/elementary/test_popup.c
+++ b/src/bin/elementary/test_popup.c
@@ -306,8 +306,7 @@ _popup_center_title_content_3button_cb(void *data, Evas_Object *obj EINA_UNUSED,
char buf[256];
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
// popup title
elm_object_part_text_set(popup, "title,text", "Title");
@@ -368,8 +367,7 @@ _popup_center_title_item_3button_cb(void *data, Evas_Object *obj EINA_UNUSED,
Evas_Object *popup, *icon1, *btn1, *btn2, *btn3;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
// popup title
elm_object_part_text_set(popup, "title,text", "Title");
@@ -441,8 +439,7 @@ _popup_center_title_text_2button_restack_cb(void *data, Evas_Object *obj EINA_UN
Evas_Object *btn, *btn2;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
evas_object_smart_callback_add(popup, "block,clicked",
_restack_block_clicked_cb, NULL);
@@ -486,8 +483,7 @@ _popup_center_text_1button_hide_show_cb(void *data, Evas_Object *obj EINA_UNUSED
}
g_popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(g_popup, is_popup_scroll);
+ elm_popup_scrollable_set(g_popup, is_popup_scroll);
elm_object_text_set(g_popup, "Hide this popup by using the button."
"When you click list item again, you can see this popup.");
@@ -535,8 +531,7 @@ _popup_center_text_3button_add_remove_button_cb(void *data,
int i;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
// popup title
elm_object_part_text_set(popup, "title,text",
@@ -571,8 +566,7 @@ _popup_transparent_cb(void *data, Evas_Object *obj EINA_UNUSED,
Evas_Object *btn;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
elm_object_style_set(popup, "transparent");
elm_object_text_set(popup, "This Popup has transparent background");
@@ -595,8 +589,7 @@ _popup_transparent_align_cb(void *data, Evas_Object *obj EINA_UNUSED,
Evas_Object *btn, *btn1;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
elm_object_style_set(popup, "transparent");
elm_object_text_set(popup, "This Popup has transparent background");
@@ -638,8 +631,7 @@ _popup_center_title_list_content_1button_cb(void *data, Evas_Object *obj EINA_UN
Evas_Object *btn;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
elm_object_part_text_set(popup, "title,text", "Title");
// list as a popup content
@@ -670,8 +662,7 @@ _popup_center_title_genlist_content_1button_cb(void *data, Evas_Object *obj EINA
int i;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
elm_object_part_text_set(popup, "title,text", "Title");
Elm_Genlist_Item_Class *itc1 = elm_genlist_item_class_new();
@@ -683,7 +674,7 @@ _popup_center_title_genlist_content_1button_cb(void *data, Evas_Object *obj EINA
// genlist as a popup content
genlist = elm_genlist_add(popup);
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
+ elm_genlist_mode_set(genlist, ELM_LIST_EXPAND);
elm_scroller_content_min_limit(genlist, EINA_FALSE, EINA_TRUE);
for (i = 0; i < 10; i++)
@@ -718,8 +709,7 @@ _subpopup_cb(void *data, Evas_Object *obj EINA_UNUSED,
Evas_Object *btn, *btnclose;
popup = elm_popup_add(data);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
elm_object_style_set(popup, "subpopup");
elm_object_part_text_set(popup, "title,text", "Title");
@@ -754,8 +744,7 @@ _popup_content_only_cb(void *data, Evas_Object *obj EINA_UNUSED,
Evas_Object *win = data;
popup = elm_popup_add(win);
- if (is_popup_scroll)
- elm_popup_scrollable_set(popup, is_popup_scroll);
+ elm_popup_scrollable_set(popup, is_popup_scroll);
bx = elm_box_add(popup);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -929,6 +918,12 @@ test_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
evas_object_show(check);
evas_object_smart_callback_add(check, "changed", _popup_scroll_cb, NULL);
+ if (elm_config_popup_scrollable_get())
+ {
+ elm_check_state_set(check, EINA_TRUE);
+ is_popup_scroll = EINA_TRUE;
+ }
+
evas_object_resize(win, 480, 400);
evas_object_show(win);
}