From 6dd5d41f8552d3d0f62e7b6d574bb276246146f1 Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Mon, 7 Jan 2013 06:06:16 +0000 Subject: [PATCH] elementary/label - and cancel the ellipsis before label try to calc the text size. SVN revision: 82320 --- legacy/elementary/src/lib/elm_label.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/legacy/elementary/src/lib/elm_label.c b/legacy/elementary/src/lib/elm_label.c index 04b02f8a53..953ae662a3 100644 --- a/legacy/elementary/src/lib/elm_label.c +++ b/legacy/elementary/src/lib/elm_label.c @@ -100,6 +100,12 @@ _label_slide_change(Evas_Object *obj) //has slide effect. if (sd->slide_mode != ELM_LABEL_SLIDE_MODE_NONE) { + if (sd->ellipsis) + { + sd->slide_ellipsis = EINA_TRUE; + elm_label_ellipsis_set(obj, EINA_FALSE); + } + //slide only if the slide area is smaller than text width size. if (sd->slide_mode == ELM_LABEL_SLIDE_MODE_AUTO) { @@ -112,18 +118,20 @@ _label_slide_change(Evas_Object *obj) evas_object_textblock_size_formatted_get(tb, &tb_w, NULL); evas_object_geometry_get(wd->resize_obj, NULL, NULL, &w, NULL); - if ((tb_w > 0) && (tb_w < w)) return; + if ((tb_w > 0) && (tb_w < w)) + { + if (sd->slide_ellipsis) + { + sd->slide_ellipsis = EINA_FALSE; + elm_label_ellipsis_set(obj, EINA_TRUE); + } + return; + } } } Edje_Message_Float_Set *msg = alloca(sizeof(Edje_Message_Float_Set) + (sizeof(double))); - if (sd->ellipsis) - { - sd->slide_ellipsis = EINA_TRUE; - elm_label_ellipsis_set(obj, EINA_FALSE); - } - msg->count = 1; msg->val[0] = sd->slide_duration;