path: root/src/bin/elementary
diff options
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-11-26 17:30:19 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-12-04 08:45:49 +0100
commit1ede2302d3bf6170fc7987d38056ce0e05001738 (patch)
tree3ba7509baebb1c2b6c3149f73855b3d2174e3430 /src/bin/elementary
parentelm_interface_scrollable: add support for *jumping* into a scroller (diff)
efl_ui_focus_manager_root_focus: ensure that adapter is part of viewport
This ensures that the adapter part is part of the viewport elements and border elements. This is done in order to support cases where a elm_scroller content is not focusable. Before the element was not correctly in viewport, and so not correctly registered. ref https://phab.enlightenment.org/T6804 Differential Revision: https://phab.enlightenment.org/D7364
Diffstat (limited to 'src/bin/elementary')
2 files changed, 46 insertions, 0 deletions
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index 4d01d963db..f44052f216 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -179,6 +179,7 @@ void test_scroller2(void *data, Evas_Object *obj, void *event_info);
void test_scroller3(void *data, Evas_Object *obj, void *event_info);
void test_scroller4(void *data, Evas_Object *obj, void *event_info);
void test_scroller5(void *data, Evas_Object *obj, void *event_info);
+void test_scroller6(void *data, Evas_Object *obj, void *event_info);
void test_efl_ui_scroller(void *data, Evas_Object *obj, void *event_info);
void test_efl_ui_scroller2(void *data, Evas_Object *obj, void *event_info);
void test_spinner(void *data, Evas_Object *obj, void *event_info);
@@ -1060,6 +1061,7 @@ add_tests:
ADD_TEST(NULL, "Scroller", "Scroller 3", test_scroller3);
ADD_TEST(NULL, "Scroller", "Page Scroller", test_scroller4);
ADD_TEST(NULL, "Scroller", "Scroller on Popup", test_scroller5);
+ ADD_TEST(NULL, "Scroller", "Scroller 6", test_scroller6);
ADD_TEST_EO(NULL, "Scroller", "Efl.Ui.Scroller", test_efl_ui_scroller);
diff --git a/src/bin/elementary/test_scroller.c b/src/bin/elementary/test_scroller.c
index a6670c6613..ef8ef7e49c 100644
--- a/src/bin/elementary/test_scroller.c
+++ b/src/bin/elementary/test_scroller.c
@@ -1017,3 +1017,47 @@ test_scroller5(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
evas_object_resize(win, 400, 550);
+test_scroller6(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+ Evas_Object *win, *scr, *lb, *table, *btn, *btn2;
+ win = elm_win_util_standard_add("Scroller with unfocusable content", "Scroller with unfocusable content");
+ elm_win_autodel_set(win, EINA_TRUE);
+ elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
+ table = elm_table_add(win);
+ evas_object_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(table, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_win_resize_object_add(win, table);
+ evas_object_show(table);
+ scr = elm_scroller_add(win);
+ evas_object_size_hint_weight_set(scr, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(scr, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_table_pack(table, scr, 0, 0, 1, 1);
+ evas_object_show(scr);
+ lb = elm_label_add(scr);
+ elm_object_text_set(lb, "Enlightenment started out way back in 1996 as a project to build a Window Manager for X11. It has grown much more since then. Enlightenment still produces this Window Manager, but it has evolved to also cover Mobile, Wearable and TV UI requirements for projects such as Tizen as well as the traditional “desktop” UI. We still push out releases. See our download page for more details on the this. Visit our contribute page for our latest source code repositories. The project is currently transitioning from X11 to Wayland. We are fully committed to moving to Wayland eventually, as its the future of graphical display layers on Linux. We still primarily support Linux for Enlightenment, but there is some effort (based on help and support from users and some developers) to support BSD too.");
+ elm_object_content_set(scr, lb);
+ evas_object_show(lb);
+ btn = elm_button_add(table);
+ evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 0.0);
+ elm_object_text_set(btn, "Button 2");
+ elm_table_pack(table, btn, 0, 1, 2, 1);
+ evas_object_show(btn);
+ btn2 = elm_button_add(table);
+ evas_object_size_hint_weight_set(btn2, 0.0, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(btn2, 0.0, EVAS_HINT_FILL);
+ elm_object_text_set(btn2, "Button 3");
+ elm_table_pack(table, btn2, 1, 0, 1, 1);
+ evas_object_show(btn2);
+ evas_object_resize(win, 400, 550);
+ evas_object_show(win);