bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1b37f1504fe47ecd1c7f8736293c29afc01cd8aa

commit 1b37f1504fe47ecd1c7f8736293c29afc01cd8aa
Author: ali <ali198...@gmail.com>
Date:   Fri May 31 23:34:50 2019 +0000

    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 <m...@marcel-hollerbach.de>
    Differential Revision: https://phab.enlightenment.org/D9064
---
 src/lib/evas/canvas/evas_object_textblock.c | 10 +++++++---
 1 file 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:
         if (c->descent < 2) c->underline_extend = 2 - c->descent;
      }
    c->ln->line_no = c->line_no - c->ln->par->line_no;
-   c->line_no++;
-   c->y += c->ascent + c->descent;
+   if ( c->line_no == 0 || c->o->multiline)
+     {
+        c->line_no++;
+        c->y += c->ascent + c->descent;
+     }
    if (c->w >= 0)
      {
         /* c->o->style_pad.r is already included in the line width, so it's
@@ -6390,7 +6393,8 @@ _layout_par(Ctxt *c)
 #endif
 
    it = _ITEM(eina_list_data_get(c->par->logical_items));
-   _layout_line_new(c, it->format);
+   if (c->line_no == 0 || c->o->multiline)
+     _layout_line_new(c, it->format);
    /* We walk on our own because we want to be able to add items from
     * inside the list and then walk them on the next iteration. */
 

-- 


Reply via email to