summaryrefslogtreecommitdiff
path: root/src/examples/genlist_example_03.c
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung@gmail.com>2013-06-19 01:22:13 +0900
committerDaniel Juyung Seo <seojuyung@gmail.com>2013-06-19 01:25:32 +0900
commit97bf47b2ade3c18a32ef7d54848aab1c342741f4 (patch)
tree20314655913c6a55ef0fb913fb7f55f2b984dddf /src/examples/genlist_example_03.c
parent81db626bffd1a10d7c39504fd2fd5401d45f9475 (diff)
genlist_example_0x.c: clean up sample codes.
1. use elm_win_util_standard_add in normal case. don't need to create the bg manually. 2. size hint align is not needed for window resize object.
Diffstat (limited to 'src/examples/genlist_example_03.c')
-rw-r--r--src/examples/genlist_example_03.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/examples/genlist_example_03.c b/src/examples/genlist_example_03.c
index d6875d73a..02a7bd822 100644
--- a/src/examples/genlist_example_03.c
+++ b/src/examples/genlist_example_03.c
@@ -74,24 +74,16 @@ _genlist_fill(Evas_Object *list)
74EAPI_MAIN int 74EAPI_MAIN int
75elm_main(int argc, char **argv) 75elm_main(int argc, char **argv)
76{ 76{
77 Evas_Object *win, *bg, *box; 77 Evas_Object *win, *box;
78 Evas_Object *list; 78 Evas_Object *list;
79 79
80 win = elm_win_add(NULL, "icon", ELM_WIN_BASIC); 80 win = elm_win_util_standard_add("genlist", "Genlist");
81 elm_win_title_set(win, "Icon");
82 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 81 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
83 elm_win_autodel_set(win, EINA_TRUE); 82 elm_win_autodel_set(win, EINA_TRUE);
84 83
85 bg = elm_bg_add(win);
86 elm_bg_color_set(bg, 255,255 ,255);
87 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
88 elm_win_resize_object_add(win, bg);
89 evas_object_show(bg);
90
91 box = elm_box_add(win); 84 box = elm_box_add(win);
92 elm_box_horizontal_set(box, EINA_TRUE); 85 elm_box_horizontal_set(box, EINA_TRUE);
93 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 86 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
94 evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
95 elm_win_resize_object_add(win, box); 87 elm_win_resize_object_add(win, box);
96 evas_object_show(box); 88 evas_object_show(box);
97 89