static void
_layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt)
{
- Evas_Object_Textblock_Item *it, *last_it = NULL;
+ Evas_Object_Textblock_Item *it;
Eina_Bool no_text = EINA_TRUE;
_layout_line_order(c, c->ln);
if (no_text)
_layout_format_ascent_descent_adjust(c, fmt);
- c->ln->w = 0;
EINA_INLIST_FOREACH(c->ln->items, it)
{
+ int endx;
if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
{
Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
}
}
- c->ln->w += it->adv;
- last_it = it;
+ endx = it->x + it->adv;
+ if (endx > c->ln->w) c->ln->w = endx;
}
- if (last_it)
- c->ln->w += last_it->w - last_it->adv;
c->ln->y = (c->y - c->par->y) + c->o->style_pad.t;
c->ln->h = c->maxascent + c->maxdescent;
if ((c->w >= 0) &&
((it->format->wrap_word) || (it->format->wrap_char) ||
it->format->wrap_mixed) &&
- ((c->x + it->w) >
+ ((c->x + it->adv) >
(c->w - c->o->style_pad.l - c->o->style_pad.r -
c->marginl - c->marginr)))
{