forked from enlightenment/efl
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
This commit is contained in:
parent
6970a020c1
commit
9860af0b35
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue