From 62828694ed17e99be05fcb4aad4b9d393f5200cd Mon Sep 17 00:00:00 2001 From: raster Date: Wed, 30 Mar 2011 10:38:02 +0000 Subject: [PATCH] ellipsis re-format on height change too if an ellipsis is set anywhere git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@58200 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_textblock.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 547be2b..de21b6f 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -435,6 +435,7 @@ struct _Evas_Object_Textblock unsigned char redraw : 1; unsigned char changed : 1; unsigned char content_changed : 1; + unsigned char have_ellipsis : 1; Eina_Bool newline_is_ps : 1; }; @@ -1579,6 +1580,13 @@ _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char fmt->ellipsis = strtod(tmp_param, &endptr); if ((fmt->ellipsis < 0.0) || (fmt->ellipsis > 1.0)) fmt->ellipsis = -1.0; + else + { + Evas_Object_Textblock *o; + + o = (Evas_Object_Textblock *)(obj->object_data); + o->have_ellipsis = 1; + } } if (new_font) @@ -3755,6 +3763,7 @@ _relayout(const Evas_Object *obj) Evas_Object_Textblock *o; o = (Evas_Object_Textblock *)(obj->object_data); + o->have_ellipsis = 0; _layout(obj, 0, obj->cur.geometry.w, obj->cur.geometry.h, @@ -8645,7 +8654,8 @@ evas_object_textblock_render_pre(Evas_Object *obj) o = (Evas_Object_Textblock *)(obj->object_data); if ((o->changed) || (o->content_changed) || ((obj->cur.geometry.w != o->last_w) || - ((o->valign != 0.0) && (obj->cur.geometry.h != o->last_h)))) + (((o->valign != 0.0) || (o->have_ellipsis)) && + (obj->cur.geometry.h != o->last_h)))) { o->formatted.valid = 0; _layout(obj, @@ -8802,7 +8812,8 @@ evas_object_textblock_coords_recalc(Evas_Object *obj) o = (Evas_Object_Textblock *)(obj->object_data); if ((obj->cur.geometry.w != o->last_w) || - ((o->valign != 0.0) && (obj->cur.geometry.h != o->last_h))) + (((o->valign != 0.0) || (o->have_ellipsis)) && + (obj->cur.geometry.h != o->last_h))) { o->formatted.valid = 0; o->changed = 1; -- 2.7.4