herdsman pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2c0f094da5a8e3dcc2c72bf582290ff3ee5e5e36

commit 2c0f094da5a8e3dcc2c72bf582290ff3ee5e5e36
Author: Daniel Hirt <[email protected]>
Date:   Sun Nov 18 12:20:10 2018 +0200

    Ui text: fix size evaluation on construction
    
    In some cases, like the example provided in the referred ticket, the
    text is set during the construction of the object.
    
    This adds another call to evaluate the size of the object at the end of
    the "finalize" stage, and also removes the line that has set the text to
    "".
    
    Fixes T7468
---
 src/lib/elementary/efl_ui_text.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index 711454d6ef..a26e0f510b 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -2032,7 +2032,6 @@ _efl_ui_text_efl_object_finalize(Eo *obj,
    efl_text_font_set(sd->text_obj, "Sans", 12);
    efl_text_normal_color_set(sd->text_obj, 255, 255, 255, 255);
    sd->single_line = !efl_text_multiline_get(sd->text_obj);
-   efl_text_set(sd->text_obj, "");
 
    sd->item_fallback_factory = efl_add(EFL_UI_TEXT_FACTORY_FALLBACK_CLASS, 
obj);
 
@@ -2078,6 +2077,9 @@ _efl_ui_text_efl_object_finalize(Eo *obj,
 
    _create_text_cursors(obj, sd);
 
+   sd->calc_force = EINA_TRUE;
+   elm_layout_sizing_eval(obj);
+
    return obj;
 
 }

-- 


Reply via email to