forked from enlightenment/efl
Label: add support for all the fancy tags already provided for entry
Comes with a simple test @feature NOTE FOR THEMERS: you must update your theme to support this!
This commit is contained in:
parent
265a7a1ccd
commit
5c60ca8555
|
@ -3,8 +3,8 @@ group { name: "elm/label/base/default";
|
|||
style { name: "label_style";
|
||||
base: "font="FN" font_size=10 text_class=tb_plain align=center color=#ffffffff style=shadow,bottom shadow_color=#00000080";
|
||||
tag: "br" "\n";
|
||||
tag: "hilight" "+ font="FNBD" text_class=tb_light";
|
||||
tag: "b" "+ font="FNBD" text_class=tb_light";
|
||||
ENABLED_TEXTBLOCK_TAGS
|
||||
}
|
||||
}
|
||||
parts {
|
||||
|
|
|
@ -68,6 +68,18 @@ test_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
|
|||
elm_box_pack_end(bx, lb);
|
||||
evas_object_show(lb);
|
||||
|
||||
lb = elm_label_add(win);
|
||||
elm_object_text_set(lb,
|
||||
"You can also use all the default entry style tags, like "
|
||||
"<hilight>hilight</hilight>, <success>success</success>, "
|
||||
"<bigger>bigger</bigger>, <smaller>smaller</smaller>, etc..."
|
||||
);
|
||||
elm_label_line_wrap_set(lb, ELM_WRAP_WORD);
|
||||
evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
|
||||
evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_box_pack_end(bx, lb);
|
||||
evas_object_show(lb);
|
||||
|
||||
evas_object_resize(win, 320, 300);
|
||||
|
||||
evas_object_show(bx);
|
||||
|
|
Loading…
Reference in New Issue