From abb427a683d0cddb8a28fc7f0474a9a542756d2c Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sun, 30 Jan 2011 10:44:37 +0000 Subject: [PATCH] Evas text: Fixed string_size_get to use the last item's width instead of advance. SVN revision: 56530 --- legacy/evas/src/lib/canvas/evas_object_text.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/legacy/evas/src/lib/canvas/evas_object_text.c b/legacy/evas/src/lib/canvas/evas_object_text.c index e5d13614df..04a6825c49 100644 --- a/legacy/evas/src/lib/canvas/evas_object_text.c +++ b/legacy/evas/src/lib/canvas/evas_object_text.c @@ -275,7 +275,7 @@ _evas_object_text_string_size_get(const Evas_Object *obj, const Evas_Object_Text *o, Evas_Coord *cw, Evas_Coord *ch) { - Evas_Object_Text_Item *it; + Evas_Object_Text_Item *it, *last_it = NULL; Evas_Coord w, h; (void) obj; @@ -287,7 +287,14 @@ _evas_object_text_string_size_get(const Evas_Object *obj, { h = it->h; } + last_it = it; } + /* Take the width, not the advance of the last item */ + if (last_it) + { + w += last_it->w - last_it->adv; + } + if (cw) *cw = w; if (ch) *ch = h; }