summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-06-24 21:29:14 +0900
committerHermet Park <hermetpark@gmail.com>2019-06-24 21:30:57 +0900
commitfa30eb62051b94af32236231149fd94a914c2d51 (patch)
tree2a240e48e0d3e9c70250dd2064011b1529656cb0
parent127209ce2b5ec5328b38fc114cd821f469dc755b (diff)
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.c29
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)
563 _sizing_eval(pd); 563 _sizing_eval(pd);
564} 564}
565 565
566static Eina_Bool
567_textpath_text_set_internal(Eo *obj, Efl_Ui_Textpath_Data *pd, const char *part, const char *text)
568{
569 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
570 Eina_Bool ret = EINA_TRUE;
571
572 if (!text) text = "";
573 ret = edje_object_part_text_set(pd->text_obj, part, text);
574 _ellipsis_set(pd, obj);
575 _sizing_eval(pd);
576
577 return ret;
578}
579
580static void 566static void
581_path_start_angle_adjust(Eo *obj, Efl_Ui_Textpath_Data *pd) 567_path_start_angle_adjust(Eo *obj, Efl_Ui_Textpath_Data *pd)
582{ 568{
@@ -650,6 +636,21 @@ _path_start_angle_adjust(Eo *obj, Efl_Ui_Textpath_Data *pd)
650 _path_data_get(obj, pd); 636 _path_data_get(obj, pd);
651} 637}
652 638
639static Eina_Bool
640_textpath_text_set_internal(Eo *obj, Efl_Ui_Textpath_Data *pd, const char *part, const char *text)
641{
642 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
643 Eina_Bool ret = EINA_TRUE;
644
645 if (!text) text = "";
646 ret = edje_object_part_text_set(pd->text_obj, part, text);
647 _ellipsis_set(pd, obj);
648 _path_start_angle_adjust(obj, pd);
649 _sizing_eval(pd);
650
651 return ret;
652}
653
653EOLIAN static void 654EOLIAN static void
654_efl_ui_textpath_efl_canvas_group_group_calculate(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd) 655_efl_ui_textpath_efl_canvas_group_group_calculate(Eo *obj EINA_UNUSED, Efl_Ui_Textpath_Data *pd)
655{ 656{