forked from enlightenment/efl
Elementary test: Added a toggle to switch between UI-mirroring modes. On the fly ui-mirroring is not yet implemented so only new windows will comply (i.e change the toggle and then click on an item from the list).
SVN revision: 56811
This commit is contained in:
parent
a1a80fe82d
commit
f087a24563
|
@ -156,10 +156,18 @@ index_changed(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
|
||||||
elm_list_item_show(event_info);
|
elm_list_item_show(event_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_ui_tg_changed(void *data, Evas_Object *obj, void *event_info)
|
||||||
|
{
|
||||||
|
(void) data; (void) event_info;
|
||||||
|
elm_mirrored_set(elm_toggle_state_get(obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
my_win_main(char *autorun)
|
my_win_main(char *autorun)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bx0, *lb, *li, *idx, *fr;
|
Evas_Object *win, *bg, *bx0, *lb, *li, *idx, *fr, *tg;
|
||||||
Eina_List *tests, *l;
|
Eina_List *tests, *l;
|
||||||
struct elm_test *t;
|
struct elm_test *t;
|
||||||
|
|
||||||
|
@ -227,6 +235,13 @@ my_win_main(char *autorun)
|
||||||
elm_frame_content_set(fr, lb);
|
elm_frame_content_set(fr, lb);
|
||||||
evas_object_show(lb);
|
evas_object_show(lb);
|
||||||
|
|
||||||
|
tg = elm_toggle_add(win);
|
||||||
|
elm_toggle_label_set(tg, "UI-Mirroring:");
|
||||||
|
elm_toggle_state_set(tg, elm_mirrored_get());
|
||||||
|
evas_object_smart_callback_add(tg, "changed", _ui_tg_changed, NULL);
|
||||||
|
elm_box_pack_end(bx0, tg);
|
||||||
|
evas_object_show(tg);
|
||||||
|
|
||||||
li = elm_list_add(win);
|
li = elm_list_add(win);
|
||||||
elm_list_always_select_mode_set(li, 1);
|
elm_list_always_select_mode_set(li, 1);
|
||||||
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
|
Loading…
Reference in New Issue