summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-09-02 20:35:22 +0200
committerDave Andreoli <dave@gurumeditation.it>2015-09-02 20:36:52 +0200
commitbc357d8015c2f80b5f45427f9aa454691a058d0b (patch)
treeba22482f69bb28ec586815ad5581e9e3c630e191
parented8b7b8945ff199a2e2787f04ad180c27874b70f (diff)
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!
-rw-r--r--data/themes/edc/elm/label.edc2
-rw-r--r--src/bin/test_label.c12
2 files changed, 13 insertions, 1 deletions
diff --git a/data/themes/edc/elm/label.edc b/data/themes/edc/elm/label.edc
index 214aa12b5..7abb815eb 100644
--- a/data/themes/edc/elm/label.edc
+++ b/data/themes/edc/elm/label.edc
@@ -3,8 +3,8 @@ group { name: "elm/label/base/default";
3 style { name: "label_style"; 3 style { name: "label_style";
4 base: "font="FN" font_size=10 text_class=tb_plain align=center color=#ffffffff style=shadow,bottom shadow_color=#00000080"; 4 base: "font="FN" font_size=10 text_class=tb_plain align=center color=#ffffffff style=shadow,bottom shadow_color=#00000080";
5 tag: "br" "\n"; 5 tag: "br" "\n";
6 tag: "hilight" "+ font="FNBD" text_class=tb_light";
7 tag: "b" "+ font="FNBD" text_class=tb_light"; 6 tag: "b" "+ font="FNBD" text_class=tb_light";
7 ENABLED_TEXTBLOCK_TAGS
8 } 8 }
9 } 9 }
10 parts { 10 parts {
diff --git a/src/bin/test_label.c b/src/bin/test_label.c
index 02b150819..14707b2d8 100644
--- a/src/bin/test_label.c
+++ b/src/bin/test_label.c
@@ -68,6 +68,18 @@ test_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
68 elm_box_pack_end(bx, lb); 68 elm_box_pack_end(bx, lb);
69 evas_object_show(lb); 69 evas_object_show(lb);
70 70
71 lb = elm_label_add(win);
72 elm_object_text_set(lb,
73 "You can also use all the default entry style tags, like "
74 "<hilight>hilight</hilight>, <success>success</success>, "
75 "<bigger>bigger</bigger>, <smaller>smaller</smaller>, etc..."
76 );
77 elm_label_line_wrap_set(lb, ELM_WRAP_WORD);
78 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
79 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, EVAS_HINT_FILL);
80 elm_box_pack_end(bx, lb);
81 evas_object_show(lb);
82
71 evas_object_resize(win, 320, 300); 83 evas_object_resize(win, 320, 300);
72 84
73 evas_object_show(bx); 85 evas_object_show(bx);