forked from enlightenment/efl
Evas textblock: Use the last item's width, not advance, when calculating line's width and wrapping.
SVN revision: 56531
This commit is contained in:
parent
abb427a683
commit
e4bcb7f90f
|
@ -2173,7 +2173,7 @@ _layout_line_order(Ctxt *c __UNUSED__, Evas_Object_Textblock_Line *line)
|
||||||
static void
|
static void
|
||||||
_layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt)
|
_layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt)
|
||||||
{
|
{
|
||||||
Evas_Object_Textblock_Item *it;
|
Evas_Object_Textblock_Item *it, *last_it = NULL;
|
||||||
Eina_Bool no_text = EINA_TRUE;
|
Eina_Bool no_text = EINA_TRUE;
|
||||||
|
|
||||||
_layout_line_order(c, c->ln);
|
_layout_line_order(c, c->ln);
|
||||||
|
@ -2191,9 +2191,9 @@ _layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt)
|
||||||
if (no_text)
|
if (no_text)
|
||||||
_layout_format_ascent_descent_adjust(c, fmt);
|
_layout_format_ascent_descent_adjust(c, fmt);
|
||||||
|
|
||||||
|
c->ln->w = 0;
|
||||||
EINA_INLIST_FOREACH(c->ln->items, it)
|
EINA_INLIST_FOREACH(c->ln->items, it)
|
||||||
{
|
{
|
||||||
int endx;
|
|
||||||
if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
|
if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
|
||||||
{
|
{
|
||||||
Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
|
Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
|
||||||
|
@ -2303,9 +2303,11 @@ _layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
endx = it->x + it->adv;
|
c->ln->w += it->adv;
|
||||||
if (endx > c->ln->w) c->ln->w = endx;
|
last_it = it;
|
||||||
}
|
}
|
||||||
|
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->y = (c->y - c->par->y) + c->o->style_pad.t;
|
||||||
c->ln->h = c->maxascent + c->maxdescent;
|
c->ln->h = c->maxascent + c->maxdescent;
|
||||||
|
@ -3182,7 +3184,7 @@ _layout_visualize_par(Ctxt *c)
|
||||||
if ((c->w >= 0) &&
|
if ((c->w >= 0) &&
|
||||||
((it->format->wrap_word) || (it->format->wrap_char) ||
|
((it->format->wrap_word) || (it->format->wrap_char) ||
|
||||||
it->format->wrap_mixed) &&
|
it->format->wrap_mixed) &&
|
||||||
((c->x + it->adv) >
|
((c->x + it->w) >
|
||||||
(c->w - c->o->style_pad.l - c->o->style_pad.r -
|
(c->w - c->o->style_pad.l - c->o->style_pad.r -
|
||||||
c->marginl - c->marginr)))
|
c->marginl - c->marginr)))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue