forked from enlightenment/efl
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:
parent
f74ca2f5a2
commit
b4b7c9239d
|
@ -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
|
2013-01-14 Cedric Bail
|
||||||
|
|
||||||
* Fix bug in eio_file_map_new container set.
|
* Fix bug in eio_file_map_new container set.
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -111,3 +111,4 @@ Fixes:
|
||||||
* Evas texblock: Fixed a bug with breaking after format items.
|
* Evas texblock: Fixed a bug with breaking after format items.
|
||||||
* Fix endianess issue in Eet_Image.
|
* Fix endianess issue in Eet_Image.
|
||||||
* Fix bug in eio_file_map_new container set.
|
* Fix bug in eio_file_map_new container set.
|
||||||
|
* Evas textblock: Fixed issue with line height when breaking on a format.
|
||||||
|
|
|
@ -4300,6 +4300,7 @@ _layout_par(Ctxt *c)
|
||||||
* inside the list and then walk them on the next iteration. */
|
* inside the list and then walk them on the next iteration. */
|
||||||
for (i = c->par->logical_items ; i ; )
|
for (i = c->par->logical_items ; i ; )
|
||||||
{
|
{
|
||||||
|
Evas_Coord prevdescent = 0, prevascent = 0;
|
||||||
int adv_line = 0;
|
int adv_line = 0;
|
||||||
int redo_item = 0;
|
int redo_item = 0;
|
||||||
it = _ITEM(eina_list_data_get(i));
|
it = _ITEM(eina_list_data_get(i));
|
||||||
|
@ -4321,6 +4322,8 @@ _layout_par(Ctxt *c)
|
||||||
Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it);
|
Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it);
|
||||||
if (fi->formatme)
|
if (fi->formatme)
|
||||||
{
|
{
|
||||||
|
prevdescent = c->maxdescent;
|
||||||
|
prevascent = c->maxascent;
|
||||||
/* If there are no text items yet, calc ascent/descent
|
/* If there are no text items yet, calc ascent/descent
|
||||||
* according to the current format. */
|
* according to the current format. */
|
||||||
if (c->maxascent + c->maxdescent == 0)
|
if (c->maxascent + c->maxdescent == 0)
|
||||||
|
@ -4474,6 +4477,12 @@ _layout_par(Ctxt *c)
|
||||||
else if (wrap == 0)
|
else if (wrap == 0)
|
||||||
{
|
{
|
||||||
/* Should wrap before the item */
|
/* 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;
|
adv_line = 0;
|
||||||
redo_item = 1;
|
redo_item = 1;
|
||||||
_layout_line_advance(c, it->format);
|
_layout_line_advance(c, it->format);
|
||||||
|
|
Loading…
Reference in New Issue