mirror of https://github.com/kivy/kivy.git
Merge pull request #427 from akshayaurora/markup_width
fix markup positioning incase of glyphs with kerning
This commit is contained in:
commit
fafc8fedaa
|
@ -226,9 +226,10 @@ class MarkupLabel(MarkupLabelBase):
|
|||
|
||||
# calculate the size of the part
|
||||
# (extract all extents of the part,
|
||||
# sum the width, and get the maximum height)
|
||||
# calculate width through extents due to kerning
|
||||
# and get the maximum height)
|
||||
pg = [cache[g] for g in part]
|
||||
pw = sum([g[0] for g in pg])
|
||||
pw = get_extents(part)[0]
|
||||
ph = max([g[1] for g in pg])
|
||||
|
||||
options = copy(options)
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
padding_y: 6
|
||||
canvas.before:
|
||||
Color:
|
||||
rgb: self.background_color
|
||||
rgba: self.background_color
|
||||
BorderImage:
|
||||
border: (16, 16, 16, 16)
|
||||
pos: self.pos
|
||||
|
@ -105,7 +105,7 @@
|
|||
pos: map(int, self.cursor_pos)
|
||||
size: 1, -self.line_height
|
||||
Color:
|
||||
rgb: self.foreground_color
|
||||
rgba: self.foreground_color
|
||||
|
||||
<TextInputCutCopyPaste>:
|
||||
size_hint: None, None
|
||||
|
|
Loading…
Reference in New Issue