diff options
author | Hermet Park <hermetpark@gmail.com> | 2019-06-24 21:29:14 +0900 |
---|---|---|
committer | Hermet Park <hermetpark@gmail.com> | 2019-06-24 21:30:57 +0900 |
commit | fa30eb62051b94af32236231149fd94a914c2d51 (patch) | |
tree | 2a240e48e0d3e9c70250dd2064011b1529656cb0 | |
parent | 127209ce2b5ec5328b38fc114cd821f469dc755b (diff) | |
download | efl-fa30eb62051b94af32236231149fd94a914c2d51.tar.gz |
efl_ui_textpath: fix a center align but that doesn't happen at text_set().
When textpath obj has a new text data, it must update center align position
based on the new text length. Previously, it missed that logic.
@fix
-rw-r--r-- | src/lib/elementary/efl_ui_textpath.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c index fd5339120f..68b209b71c 100644 --- a/src/lib/elementary/efl_ui_textpath.c +++ b/src/lib/elementary/efl_ui_textpath.c @@ -563,20 +563,6 @@ _efl_ui_textpath_efl_gfx_path_commit(Eo *obj, Efl_Ui_Textpath_Data *pd) _sizing_eval(pd); } -static Eina_Bool -_textpath_text_set_internal(Eo *obj, Efl_Ui_Textpath_Data *pd, const char *part, const char *text) -{ - ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); - Eina_Bool ret = EINA_TRUE; - - if (!text) text = ""; - ret = edje_object_part_text_set(pd->text_obj, part, text); - _ellipsis_set(pd, obj); - _sizing_eval(pd); - - return ret; -} - static void _path_start_angle_adjust(Eo *obj, Efl_Ui_Textpath_Data *pd) { @@ -650,6 +636,21 @@ _path_start_angle_adjust(Eo *obj, Efl_Ui_Textpath_Data *pd) _path_data_get(obj, pd); } +static Eina_Bool +_textpath_text_set_internal(Eo *obj, Efl_Ui_Textpath_Data *pd, const char *part, const char *text) +{ + ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); + Eina_Bool ret = EINA_TRUE; + + if (!text) text = ""; + ret = edje_object_part_text_set(pd->text_obj, part, text); + _ellipsis_set(pd, obj); + _path_start_angle_adjust(obj, pd); + _sizing_eval(pd); + + return ret; +} + EOLIAN static void _efl_ui_textpath_efl_canvas_group_group_calculate(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd) { |