seoz pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0d9d9b80c9164ffd0396ab92ff25c5778a4dcb41
commit 0d9d9b80c9164ffd0396ab92ff25c5778a4dcb41 Author: Jee-Yong Um <con...@gmail.com> Date: Sat Feb 21 13:38:13 2015 +0900 elm_panel: make "panel scrollable" work in elementary_test Summary: Thumbscroll is disabled in default configuration, but "scrollable" feature in panel only works when thumbscroll is turned on. To make "scrollable" work always in elementary test, this patch enables thumbscroll temporarily regardless of configuration. (configuration is restored when sample window is closed.) Reviewers: Hermet, seoz Subscribers: seoz, Hermet Differential Revision: https://phab.enlightenment.org/D1983 --- src/bin/test_panel.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/bin/test_panel.c b/src/bin/test_panel.c index 7743174..fc57c04 100644 --- a/src/bin/test_panel.c +++ b/src/bin/test_panel.c @@ -278,12 +278,18 @@ _clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUS elm_panel_toggle(panel); } +static void +_changed_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) +{ + elm_config_scroll_thumbscroll_enabled_set(elm_check_state_get(obj)); +} + void test_panel2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - Evas_Object *win, *box, *table, *panel, *list, *button; + Evas_Object *win, *box, *label, *check, *table, *panel, *list, *button; int i; // Left Panel @@ -298,6 +304,22 @@ test_panel2(void *data EINA_UNUSED, evas_object_show(box); elm_win_resize_object_add(win, box); + // label + label = elm_label_add(box); + elm_object_text_set(label, "You should enable thumb scroll to use scrollable panel.<br/>" + "Check below or enable thumb scroll in elementary_config."); + evas_object_show(label); + elm_box_pack_end(box, label); + + // check + check = elm_check_add(box); + elm_check_state_set(check, elm_config_scroll_thumbscroll_enabled_get()); + elm_object_text_set(check, "Enable thumb scroll (temporarily)"); + evas_object_show(check); + elm_box_pack_end(box, check); + + evas_object_smart_callback_add(check, "changed", _changed_cb, NULL); + // toggle button button = elm_button_add(box); evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, 0); --