forked from enlightenment/efl
Add a no-wrap mode to the "Entry Style Default" test
I'm trying to reproduce an issue, not spotted by this, but can still be usefull.
This commit is contained in:
parent
74ae853fd4
commit
fd95ba8362
|
@ -990,6 +990,17 @@ ent_bt_def_style_markup(void *data, Evas_Object *obj, void *event_info EINA_UNUS
|
|||
elm_object_text_set(en, default_style_text);
|
||||
}
|
||||
|
||||
static void
|
||||
ent_bt_def_style_wrap(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||
{
|
||||
Evas_Object *en = data;
|
||||
|
||||
if (elm_check_state_get(obj))
|
||||
elm_entry_line_wrap_set(en, ELM_WRAP_NONE);
|
||||
else
|
||||
elm_entry_line_wrap_set(en, ELM_WRAP_WORD);
|
||||
}
|
||||
|
||||
void
|
||||
test_entry_style_default(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
|
@ -1009,6 +1020,7 @@ test_entry_style_default(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
|
|||
evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_object_text_set(en, default_style_text);
|
||||
elm_entry_editable_set(en, EINA_TRUE);
|
||||
elm_entry_line_wrap_set(en, ELM_WRAP_WORD);
|
||||
elm_box_pack_end(bx, en);
|
||||
evas_object_show(en);
|
||||
|
||||
|
@ -1040,6 +1052,12 @@ test_entry_style_default(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
|
|||
elm_box_pack_end(vbx, o);
|
||||
evas_object_show(o);
|
||||
|
||||
o = elm_check_add(win);
|
||||
elm_object_text_set(o, "no wrap");
|
||||
evas_object_smart_callback_add(o, "changed", ent_bt_def_style_wrap, en);
|
||||
elm_box_pack_end(vbx, o);
|
||||
evas_object_show(o);
|
||||
|
||||
evas_object_show(win);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue