jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9860af0b35fb1a2d4bc0b63d5ac0d20cdba3321c

commit 9860af0b35fb1a2d4bc0b63d5ac0d20cdba3321c
Author: Jean-Philippe Andre <[email protected]>
Date:   Wed Jan 8 16:39:46 2014 +0900

    Textblock: Fix padding with styles (part 2)
    
    Summary:
    If ONE single item in the whole textblock has a padding of k,
    then ALL the lines of the textblock will be padded by k pixels.
    
    Here's a solution to add the padding only to the first line.
    
    Test Plan:
    Write any multiline text, without styles, in an entry.
    Add some glow to one element. All lines should be spaced by
    an extra 2 pixels.
    
    Reviewers: tasn
    
    CC: cedric
    
    Differential Revision: https://phab.enlightenment.org/D442
---
 src/lib/evas/canvas/evas_object_textblock.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 8e47a10..6a56956 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -3433,7 +3433,7 @@ loop_advance:
         if ((it->x + it->adv) > c->ln->w) c->ln->w = it->x + it->adv;
      }
 
-   c->ln->y = (c->y - c->par->y) + c->o->style_pad.t;
+   c->ln->y = c->y - c->par->y;
    c->ln->h = c->ascent + c->descent;
 
    /* Handle max ascent and descent if at the edges */
@@ -3448,6 +3448,8 @@ loop_advance:
              ascdiff = c->maxascent - c->ascent;
              c->ln->y += ascdiff;
              c->y += ascdiff;
+             c->ln->y += c->o->style_pad.t;
+             c->y += c->o->style_pad.t;
           }
      }
 

-- 


Reply via email to