summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorali <ali198724@gmail.com>2019-05-31 23:34:50 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-01-27 09:26:05 +0100
commit1b37f1504fe47ecd1c7f8736293c29afc01cd8aa (patch)
tree61dbe9fe6e0e04854d2e078cf959d2875a1ddd6b
parent8ec6e28b7cc568a8bb636de90b2dd10f19db2be3 (diff)
evas_textblock: <ps> tag respects multiline propertie
previously multi-line property does not effect <ps> tag. now <ps> is treated visually like <br> when multiline is set to EINA_FALSE this issue was that each new paragraph will create new line regardless of multi line property value, now only first paragraph will create new line if multi-line property is false, and other paragraphs will use same line this will also fix the following patch https://phab.enlightenment.org/D8603 And both will use same test suite code Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9064
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 4f44054152..c654822871 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -4717,8 +4717,11 @@ loop_advance:
4717 if (c->descent < 2) c->underline_extend = 2 - c->descent; 4717 if (c->descent < 2) c->underline_extend = 2 - c->descent;
4718 } 4718 }
4719 c->ln->line_no = c->line_no - c->ln->par->line_no; 4719 c->ln->line_no = c->line_no - c->ln->par->line_no;
4720 c->line_no++; 4720 if ( c->line_no == 0 || c->o->multiline)
4721 c->y += c->ascent + c->descent; 4721 {
4722 c->line_no++;
4723 c->y += c->ascent + c->descent;
4724 }
4722 if (c->w >= 0) 4725 if (c->w >= 0)
4723 { 4726 {
4724 /* c->o->style_pad.r is already included in the line width, so it's 4727 /* c->o->style_pad.r is already included in the line width, so it's
@@ -6390,7 +6393,8 @@ _layout_par(Ctxt *c)
6390#endif 6393#endif
6391 6394
6392 it = _ITEM(eina_list_data_get(c->par->logical_items)); 6395 it = _ITEM(eina_list_data_get(c->par->logical_items));
6393 _layout_line_new(c, it->format); 6396 if (c->line_no == 0 || c->o->multiline)
6397 _layout_line_new(c, it->format);
6394 /* We walk on our own because we want to be able to add items from 6398 /* We walk on our own because we want to be able to add items from
6395 * inside the list and then walk them on the next iteration. */ 6399 * inside the list and then walk them on the next iteration. */
6396 6400