summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-01-17 16:06:52 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2020-01-17 16:10:40 +0100
commitbac185e8f3ed5a17d9c29e5daf2e2038b6734767 (patch)
treecd4e20066671accc8b436f21dc2a161270ccfbb7 /src/bin
parent25e52f81066b79fdf758cbd97830a85fdb88c0a9 (diff)
Introduce Separator
Summary: this is just like elm_separator, just written for unified widgets. This inherits from item, which has the advantage that this separator can also be added into item container. Reviewers: zmike, segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11125
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/elementary/meson.build1
-rw-r--r--src/bin/elementary/test.c3
-rw-r--r--src/bin/elementary/test_ui_separator.c26
3 files changed, 29 insertions, 1 deletions
diff --git a/src/bin/elementary/meson.build b/src/bin/elementary/meson.build
index 2195ded..7eddf03 100644
--- a/src/bin/elementary/meson.build
+++ b/src/bin/elementary/meson.build
@@ -161,6 +161,7 @@ elementary_test_src = [
161 'test_ui_collection_view.c', 161 'test_ui_collection_view.c',
162 'test_ui_items.c', 162 'test_ui_items.c',
163 'test_ui_frame.c', 163 'test_ui_frame.c',
164 'test_ui_separator.c',
164 'test_efl_ui_vg_animation.c', 165 'test_efl_ui_vg_animation.c',
165 'test_efl_gfx_vg_value_provider.c', 166 'test_efl_gfx_vg_value_provider.c',
166 'test.h' 167 'test.h'
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index 94b4b3d..b86505a 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -409,6 +409,7 @@ void test_ui_frame(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
409 409
410void test_efl_ui_vg_animation(void *data, Evas_Object *obj, void *event_info); 410void test_efl_ui_vg_animation(void *data, Evas_Object *obj, void *event_info);
411void test_efl_gfx_vg_value_provider(void *data, Evas_Object *obj, void *event_info); 411void test_efl_gfx_vg_value_provider(void *data, Evas_Object *obj, void *event_info);
412void test_ui_separator(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED);
412 413
413static void _list_udpate(void); 414static void _list_udpate(void);
414 415
@@ -1151,7 +1152,7 @@ add_tests:
1151 // FIXME: add frame test 1152 // FIXME: add frame test
1152 ADD_TEST(NULL, "Boundaries", "Bubble", test_bubble); 1153 ADD_TEST(NULL, "Boundaries", "Bubble", test_bubble);
1153 ADD_TEST(NULL, "Boundaries", "Separator", test_separator); 1154 ADD_TEST(NULL, "Boundaries", "Separator", test_separator);
1154 1155 ADD_TEST_EO(NULL, "Boundaries", "Separator", test_ui_separator);
1155 //------------------------------// 1156 //------------------------------//
1156 ADD_TEST(NULL, "Range Values", "Spinner", test_spinner); 1157 ADD_TEST(NULL, "Range Values", "Spinner", test_spinner);
1157 ADD_TEST_EO(NULL, "Range Values", "Efl.Ui.Spin", test_ui_spin); 1158 ADD_TEST_EO(NULL, "Range Values", "Efl.Ui.Spin", test_ui_spin);
diff --git a/src/bin/elementary/test_ui_separator.c b/src/bin/elementary/test_ui_separator.c
new file mode 100644
index 0000000..d30afd3
--- /dev/null
+++ b/src/bin/elementary/test_ui_separator.c
@@ -0,0 +1,26 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4#include <Efl_Ui.h>
5
6void
7test_ui_separator(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED)
8{
9 Eo *win, *table, *sep;
10
11 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
12 efl_text_set(efl_added, "Efl.Ui.Separator"),
13 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
14
15 table = efl_add(EFL_UI_TABLE_CLASS, win);
16 efl_content_set(win, table);
17
18 sep = efl_add(EFL_UI_SEPARATOR_CLASS, win);
19 efl_pack_table(table, sep, 0, 0, 2, 1);
20
21 sep = efl_add(EFL_UI_SEPARATOR_CLASS, win,
22 efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_VERTICAL));
23 efl_pack_table(table, sep, 0, 0, 2, 1);
24
25 efl_gfx_entity_size_set(win, EINA_SIZE2D(100, 120));
26}