summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@datenfreihafen.org>2013-01-14 14:18:10 +0000
committerStefan Schmidt <stefan@datenfreihafen.org>2013-01-14 14:18:10 +0000
commitb4b7c9239d53afef59914ec12816198aad75fef8 (patch)
treec96c00af233088d74cbd617763c551adf7335412
parentf74ca2f5a290b15a7f99a03eec127f9eba2b2d28 (diff)
Evas textblock: Fixed issue with line height when breakingon format.
All kudos to Tom for this one. SVN revision: 82763
-rw-r--r--ChangeLog5
-rw-r--r--NEWS1
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c9
3 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 85be617199..ce842b2592 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12013-01-14 Tom Hacohen (TAsn)
2
3 * Evas textblock: Fixed issue with line height when breaking on a
4 format.
5
12013-01-14 Cedric Bail 62013-01-14 Cedric Bail
2 7
3 * Fix bug in eio_file_map_new container set. 8 * Fix bug in eio_file_map_new container set.
diff --git a/NEWS b/NEWS
index 962d2c2cc7..4658915137 100644
--- a/NEWS
+++ b/NEWS
@@ -111,3 +111,4 @@ Fixes:
111 * Evas texblock: Fixed a bug with breaking after format items. 111 * Evas texblock: Fixed a bug with breaking after format items.
112 * Fix endianess issue in Eet_Image. 112 * Fix endianess issue in Eet_Image.
113 * Fix bug in eio_file_map_new container set. 113 * Fix bug in eio_file_map_new container set.
114 * Evas textblock: Fixed issue with line height when breaking on a format.
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 2249111457..8f14453dee 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -4300,6 +4300,7 @@ _layout_par(Ctxt *c)
4300 * inside the list and then walk them on the next iteration. */ 4300 * inside the list and then walk them on the next iteration. */
4301 for (i = c->par->logical_items ; i ; ) 4301 for (i = c->par->logical_items ; i ; )
4302 { 4302 {
4303 Evas_Coord prevdescent = 0, prevascent = 0;
4303 int adv_line = 0; 4304 int adv_line = 0;
4304 int redo_item = 0; 4305 int redo_item = 0;
4305 it = _ITEM(eina_list_data_get(i)); 4306 it = _ITEM(eina_list_data_get(i));
@@ -4321,6 +4322,8 @@ _layout_par(Ctxt *c)
4321 Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it); 4322 Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it);
4322 if (fi->formatme) 4323 if (fi->formatme)
4323 { 4324 {
4325 prevdescent = c->maxdescent;
4326 prevascent = c->maxascent;
4324 /* If there are no text items yet, calc ascent/descent 4327 /* If there are no text items yet, calc ascent/descent
4325 * according to the current format. */ 4328 * according to the current format. */
4326 if (c->maxascent + c->maxdescent == 0) 4329 if (c->maxascent + c->maxdescent == 0)
@@ -4474,6 +4477,12 @@ _layout_par(Ctxt *c)
4474 else if (wrap == 0) 4477 else if (wrap == 0)
4475 { 4478 {
4476 /* Should wrap before the item */ 4479 /* Should wrap before the item */
4480
4481 /* We didn't end up using the item, so revert the ascent
4482 * and descent changes. */
4483 c->maxdescent = prevdescent;
4484 c->maxascent = prevascent;
4485
4477 adv_line = 0; 4486 adv_line = 0;
4478 redo_item = 1; 4487 redo_item = 1;
4479 _layout_line_advance(c, it->format); 4488 _layout_line_advance(c, it->format);