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)
downloadefl-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.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)
_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)
{