diff options
author | Youngbok Shin <youngb.shin@samsung.com> | 2016-03-16 19:30:44 +0900 |
---|---|---|
committer | Youngbok Shin <youngb.shin@samsung.com> | 2016-03-16 19:30:44 +0900 |
commit | a73f121a5d1b9c5bae1612e9587094bcb873653c (patch) | |
tree | c96fb4e9e9075631a83fb693a00daf06697f9347 | |
parent | 4c7f489e02a364d4c9c102f230c6d26a738b1256 (diff) | |
download | elementary-a73f121a5d1b9c5bae1612e9587094bcb873653c.tar.gz |
Label: Add non-editable/singleline label widget by default.
-rw-r--r-- | src/lib/elm_label.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c index 378e16702..089f76e76 100644 --- a/src/lib/elm_label.c +++ b/src/lib/elm_label.c @@ -331,9 +331,14 @@ _elm_label_eo_base_constructor(Eo *obj, Elm_Label_Data *_pd EINA_UNUSED) EOLIAN static Eo * _elm_label_eo_base_finalize(Eo *obj, Elm_Label_Data *_pd EINA_UNUSED) { - if (!elm_layout_theme_set(obj, "entry", "base-noedit", elm_widget_style_get(obj))) - CRI("Failed to set layout!"); - elm_layout_text_set(obj, NULL, "<br>"); + /* FIXME: It should be called when eo_add() is called for + * improving performance. Elm label is singleline and non editable + * by default. The changing these properties not only change Edje, + * but also change flags inside of entry. + * So, we need to call entry APIs for changing its properties. */ + elm_entry_editable_set(obj, EINA_FALSE); + elm_entry_single_line_set(obj, EINA_TRUE); + elm_layout_sizing_eval(obj); return obj; } |