summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-04-12 13:40:04 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-04-15 13:34:20 +0100
commit01f634b7db9f511f51e49b5823e20fb28243db30 (patch)
tree1aa0c99257d39fa1f98424aca61dee6760c32d27 /src/bin
parentbc5df48ffe460b54da70d95efe0b617468158908 (diff)
elm test - add tests ofr other styles for panes provided by default
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/elementary/test.c10
-rw-r--r--src/bin/elementary/test_panes.c47
2 files changed, 54 insertions, 3 deletions
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index f81af61ada..146d7ef902 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -212,6 +212,11 @@ void test_menu2(void *data, Evas_Object *obj, void *event_info);
212void test_panel(void *data, Evas_Object *obj, void *event_info); 212void test_panel(void *data, Evas_Object *obj, void *event_info);
213void test_panel2(void *data, Evas_Object *obj, void *event_info); 213void test_panel2(void *data, Evas_Object *obj, void *event_info);
214void test_panes(void *data, Evas_Object *obj, void *event_info); 214void test_panes(void *data, Evas_Object *obj, void *event_info);
215void test_panes_flush(void *data, Evas_Object *obj, void *event_info);
216void test_panes_left_fold(void *data, Evas_Object *obj, void *event_info);
217void test_panes_right_fold(void *data, Evas_Object *obj, void *event_info);
218void test_panes_up_fold(void *data, Evas_Object *obj, void *event_info);
219void test_panes_down_fold(void *data, Evas_Object *obj, void *event_info);
215void test_panes_minsize(void *data, Evas_Object *obj, void *event_info); 220void test_panes_minsize(void *data, Evas_Object *obj, void *event_info);
216void test_calendar(void *data, Evas_Object *obj, void *event_info); 221void test_calendar(void *data, Evas_Object *obj, void *event_info);
217void test_calendar2(void *data, Evas_Object *obj, void *event_info); 222void test_calendar2(void *data, Evas_Object *obj, void *event_info);
@@ -1172,6 +1177,11 @@ add_tests:
1172 ADD_TEST(NULL, "Dividers", "Panel", test_panel); 1177 ADD_TEST(NULL, "Dividers", "Panel", test_panel);
1173 ADD_TEST(NULL, "Dividers", "Panel Scrollable", test_panel2); 1178 ADD_TEST(NULL, "Dividers", "Panel Scrollable", test_panel2);
1174 ADD_TEST(NULL, "Dividers", "Panes", test_panes); 1179 ADD_TEST(NULL, "Dividers", "Panes", test_panes);
1180 ADD_TEST(NULL, "Dividers", "Panes Flush", test_panes_flush);
1181 ADD_TEST(NULL, "Dividers", "Panes Left Fold", test_panes_left_fold);
1182 ADD_TEST(NULL, "Dividers", "Panes Right Fold", test_panes_right_fold);
1183 ADD_TEST(NULL, "Dividers", "Panes Up Fold", test_panes_up_fold);
1184 ADD_TEST(NULL, "Dividers", "Panes Down Fold", test_panes_down_fold);
1175 ADD_TEST_EO(NULL, "Dividers", "Efl.Ui.Panes", test_panes_minsize); 1185 ADD_TEST_EO(NULL, "Dividers", "Efl.Ui.Panes", test_panes_minsize);
1176 ADD_TEST_EO(NULL, "Dividers", "Efl.Ui.Panel", test_ui_panel); 1186 ADD_TEST_EO(NULL, "Dividers", "Efl.Ui.Panel", test_ui_panel);
1177 ADD_TEST_EO(NULL, "Dividers", "Efl.Ui.Panel Scrollable", test_ui_panel2); 1187 ADD_TEST_EO(NULL, "Dividers", "Efl.Ui.Panel Scrollable", test_ui_panel2);
diff --git a/src/bin/elementary/test_panes.c b/src/bin/elementary/test_panes.c
index 21eb3dcf5b..8560daa504 100644
--- a/src/bin/elementary/test_panes.c
+++ b/src/bin/elementary/test_panes.c
@@ -38,8 +38,8 @@ _clicked_double(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
38 elm_panes_content_left_size_set(obj, *size); 38 elm_panes_content_left_size_set(obj, *size);
39} 39}
40 40
41void 41static void
42test_panes(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 42_test_panes(const char *style)
43{ 43{
44 Evas_Object *win, *bg, *panes, *panes_h, *bt; 44 Evas_Object *win, *bg, *panes, *panes_h, *bt;
45 static double vbar_size = 0.0; 45 static double vbar_size = 0.0;
@@ -56,6 +56,7 @@ test_panes(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
56 evas_object_show(bg); 56 evas_object_show(bg);
57 57
58 panes = elm_panes_add(win); 58 panes = elm_panes_add(win);
59 elm_object_style_set(panes, style);
59 evas_object_size_hint_weight_set(panes, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 60 evas_object_size_hint_weight_set(panes, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
60 elm_panes_content_left_min_size_set(panes, 100); 61 elm_panes_content_left_min_size_set(panes, 100);
61 elm_panes_content_left_size_set(panes, 0.7); 62 elm_panes_content_left_size_set(panes, 0.7);
@@ -76,6 +77,7 @@ test_panes(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
76 77
77 // add panes 78 // add panes
78 panes_h = elm_panes_add(win); 79 panes_h = elm_panes_add(win);
80 elm_object_style_set(panes_h, style);
79 elm_panes_horizontal_set(panes_h, EINA_TRUE); 81 elm_panes_horizontal_set(panes_h, EINA_TRUE);
80 elm_panes_content_right_min_size_set(panes_h, 100); 82 elm_panes_content_right_min_size_set(panes_h, 100);
81 elm_panes_content_right_size_set(panes_h, 0.3); 83 elm_panes_content_right_size_set(panes_h, 0.3);
@@ -102,4 +104,43 @@ test_panes(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
102 104
103 evas_object_resize(win, 320, 400); 105 evas_object_resize(win, 320, 400);
104 evas_object_show(win); 106 evas_object_show(win);
105} \ No newline at end of file 107}
108
109void
110test_panes(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
111{
112 _test_panes("default");
113}
114
115void
116test_panes_flush(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
117{
118 _test_panes("flush");
119}
120
121void
122test_panes_left_fold(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
123{
124 _test_panes("left-fold");
125}
126
127void
128test_panes_right_fold(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
129{
130 _test_panes("right-fold");
131}
132
133void
134test_panes_up_fold(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
135{
136 _test_panes("up-fold");
137}
138
139void
140test_panes_down_fold(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
141{
142 _test_panes("down-fold");
143}
144
145
146