I.e even if advance is smaller than width, take it into account.
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@71507
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
2012-05-29 Tom Hacohen (TAsn)
+ * Text: Fixed an issue with text object sizing.
* Font: Fixed run-time italic.
_evas_object_text_horiz_advance_get(const Evas_Object *obj,
const Evas_Object_Text *o)
{
- Evas_Object_Text_Item *it;
+ Evas_Object_Text_Item *it, *last_it = NULL;
Evas_Coord adv;
(void) obj;
EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it)
{
adv += it->adv;
+ last_it = it;
}
+
+ if (last_it && (last_it->w > last_it->adv))
+ adv += last_it->w - last_it->adv;
return adv;
}