davemds pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=bc357d8015c2f80b5f45427f9aa454691a058d0b

commit bc357d8015c2f80b5f45427f9aa454691a058d0b
Author: Dave Andreoli <d...@gurumeditation.it>
Date:   Wed Sep 2 20:35:22 2015 +0200

    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!
---
 data/themes/edc/elm/label.edc |  2 +-
 src/bin/test_label.c          | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/data/themes/edc/elm/label.edc b/data/themes/edc/elm/label.edc
index 214aa12..7abb815 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";
       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 {
diff --git a/src/bin/test_label.c b/src/bin/test_label.c
index 02b1508..14707b2 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
    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);

-- 


Reply via email to