From 8ce60f14dada3c0a3dbf76cb6799933bcb22d937 Mon Sep 17 00:00:00 2001 From: tasn 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. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@56530 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_text.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/canvas/evas_object_text.c b/src/lib/canvas/evas_object_text.c index e5d1361..04a6825 100644 --- a/src/lib/canvas/evas_object_text.c +++ b/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; } -- 2.7.4