2 # include "elementary_config.h"
4 #include <Elementary.h>
5 #ifndef ELM_LIB_QUICKLAUNCH
7 test_scaling(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
9 Evas_Object *win, *bx, *bt;
11 win = elm_win_util_standard_add("scaling", "Scaling");
12 elm_win_autodel_set(win, EINA_TRUE);
14 bx = elm_box_add(win);
15 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
16 elm_win_resize_object_add(win, bx);
19 bt = elm_button_add(win);
20 elm_object_text_set(bt, "Scale: 0.5");
21 elm_object_scale_set(bt, 0.5);
22 elm_box_pack_end(bx, bt);
25 bt = elm_button_add(win);
26 elm_object_text_set(bt, "Scale: 0.75");
27 elm_object_scale_set(bt, 0.75);
28 elm_box_pack_end(bx, bt);
31 bt = elm_button_add(win);
32 elm_object_text_set(bt, "Scale: 1.0");
33 elm_object_scale_set(bt, 1.0);
34 elm_box_pack_end(bx, bt);
37 bt = elm_button_add(win);
38 elm_object_text_set(bt, "Scale: 1.5");
39 elm_object_scale_set(bt, 1.5);
40 elm_box_pack_end(bx, bt);
43 bt = elm_button_add(win);
44 elm_object_text_set(bt, "Scale: 2.0");
45 elm_object_scale_set(bt, 2.0);
46 elm_box_pack_end(bx, bt);
49 bt = elm_button_add(win);
50 elm_object_text_set(bt, "Scale: 3.0");
51 elm_object_scale_set(bt, 3.0);
52 elm_box_pack_end(bx, bt);
55 evas_object_resize(win, 320, 320);
56 evas_object_show(win);
60 test_scaling2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
62 Evas_Object *win, *bg, *bx, *fr, *lb;
64 win = elm_win_add(NULL, "scaling2", ELM_WIN_BASIC);
65 elm_win_title_set(win, "Scaling 2");
66 elm_win_autodel_set(win, EINA_TRUE);
69 elm_win_resize_object_add(win, bg);
70 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
73 bx = elm_box_add(win);
74 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
75 elm_win_resize_object_add(win, bx);
78 fr = elm_frame_add(win);
79 elm_object_scale_set(fr, 0.5);
80 elm_object_text_set(fr, "Scale: 0.5");
81 lb = elm_label_add(win);
82 elm_object_text_set(lb,
83 "Parent frame scale<br/>"
84 "is 0.5. Child should<br/>"
86 elm_object_content_set(fr, lb);
88 elm_box_pack_end(bx, fr);
91 fr = elm_frame_add(win);
92 elm_object_text_set(fr, "Scale: 1.0");
93 lb = elm_label_add(win);
94 elm_object_text_set(lb,
95 "Parent frame scale<br/>"
96 "is 1.0. Child should<br/>"
98 elm_object_content_set(fr, lb);
100 elm_object_scale_set(fr, 1.0);
101 elm_box_pack_end(bx, fr);
102 evas_object_show(fr);
104 fr = elm_frame_add(win);
105 elm_object_text_set(fr, "Scale: 2.0");
106 lb = elm_label_add(win);
107 elm_object_text_set(lb,
108 "Parent frame scale<br/>"
109 "is 2.0. Child should<br/>"
111 elm_object_content_set(fr, lb);
112 evas_object_show(lb);
113 elm_object_scale_set(fr, 2.0);
114 elm_box_pack_end(bx, fr);
115 evas_object_show(fr);
117 evas_object_resize(win, 320, 320);
118 evas_object_show(win);