Evas textblock: Fixed issue with line height when breakingon format.

All kudos to Tom for this one.

SVN revision: 82763
This commit is contained in:
Stefan Schmidt 2013-01-14 14:18:10 +00:00
parent f74ca2f5a2
commit b4b7c9239d
3 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-01-14 Tom Hacohen (TAsn)
* Evas textblock: Fixed issue with line height when breaking on a
format.
2013-01-14 Cedric Bail
* Fix bug in eio_file_map_new container set.

1
NEWS
View File

@ -111,3 +111,4 @@ Fixes:
* Evas texblock: Fixed a bug with breaking after format items.
* Fix endianess issue in Eet_Image.
* Fix bug in eio_file_map_new container set.
* Evas textblock: Fixed issue with line height when breaking on a format.

View File

@ -4300,6 +4300,7 @@ _layout_par(Ctxt *c)
* inside the list and then walk them on the next iteration. */
for (i = c->par->logical_items ; i ; )
{
Evas_Coord prevdescent = 0, prevascent = 0;
int adv_line = 0;
int redo_item = 0;
it = _ITEM(eina_list_data_get(i));
@ -4321,6 +4322,8 @@ _layout_par(Ctxt *c)
Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it);
if (fi->formatme)
{
prevdescent = c->maxdescent;
prevascent = c->maxascent;
/* If there are no text items yet, calc ascent/descent
* according to the current format. */
if (c->maxascent + c->maxdescent == 0)
@ -4474,6 +4477,12 @@ _layout_par(Ctxt *c)
else if (wrap == 0)
{
/* Should wrap before the item */
/* We didn't end up using the item, so revert the ascent
* and descent changes. */
c->maxdescent = prevdescent;
c->maxascent = prevascent;
adv_line = 0;
redo_item = 1;
_layout_line_advance(c, it->format);