Evas text: Fixed string_size_get to use the last item's width instead of advance.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Jan 2011 10:44:37 +0000 (10:44 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Jan 2011 10:44:37 +0000 (10:44 +0000)
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

index e5d1361..04a6825 100644 (file)
@@ -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;
 }