forked from enlightenment/efl
Evas textblock: Unified the wmax calculation into one place.
SVN revision: 59097
This commit is contained in:
parent
65e50307a0
commit
1ce96a62e0
|
@ -2351,15 +2351,19 @@ loop_advance:
|
||||||
((c->w - c->ln->w -
|
((c->w - c->ln->w -
|
||||||
c->o->style_pad.l - c->o->style_pad.r -
|
c->o->style_pad.l - c->o->style_pad.r -
|
||||||
c->marginl - c->marginr) * _layout_line_align_get(c));
|
c->marginl - c->marginr) * _layout_line_align_get(c));
|
||||||
if ((c->par->x + c->ln->x + c->ln->w + c->marginr - c->o->style_pad.l) > c->wmax)
|
|
||||||
c->wmax = c->par->x + c->ln->x + c->ln->w + c->marginl + c->marginr - c->o->style_pad.l;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
c->ln->x = c->marginl + c->o->style_pad.l;
|
c->ln->x = c->marginl + c->o->style_pad.l;
|
||||||
if ((c->par->x + c->ln->x + c->ln->w + c->marginr - c->o->style_pad.l) > c->wmax)
|
|
||||||
c->wmax = c->par->x + c->ln->x + c->ln->w + c->marginl + c->marginr - c->o->style_pad.l;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
Evas_Coord new_wmax = c->par->x + c->ln->x + c->ln->w +
|
||||||
|
c->marginl + c->marginr - (c->o->style_pad.l + c->o->style_pad.r);
|
||||||
|
if (new_wmax > c->wmax)
|
||||||
|
c->wmax = new_wmax;
|
||||||
|
}
|
||||||
|
|
||||||
c->par->h = c->ln->y + c->ln->h;
|
c->par->h = c->ln->y + c->ln->h;
|
||||||
if (c->ln->w + c->ln->x > c->par->w)
|
if (c->ln->w + c->ln->x > c->par->w)
|
||||||
c->par->w = c->ln->x + c->ln->w;
|
c->par->w = c->ln->x + c->ln->w;
|
||||||
|
|
Loading…
Reference in New Issue