mirror of https://github.com/kivy/kivy.git
Merge pull request #6515 from misl6/fix-max_lines-valign
Fixes positioning (valign) issue when using max_lines
This commit is contained in:
commit
5cdd52a6a7
|
@ -566,8 +566,10 @@ def layout_text(object text, list lines, tuple size, tuple text_size,
|
|||
if max_lines > 0 and len(lines) > max_lines:
|
||||
val = True
|
||||
if dwn:
|
||||
h-= sum(l.h for l in lines[max_lines:])
|
||||
del lines[max_lines:]
|
||||
else:
|
||||
h-= sum(l.h for l in lines[:max(0, <int>len(lines) - max_lines)])
|
||||
del lines[:max(0, <int>len(lines) - max_lines)]
|
||||
|
||||
# now make sure we don't have lines outside specified height
|
||||
|
|
Loading…
Reference in New Issue