Merge pull request #2 from makermelissa/master
Text Centers vertically much better
This commit is contained in:
commit
d2413edf0d
1 changed files with 1 additions and 1 deletions
2
adafruit_button.py
Normal file → Executable file
2
adafruit_button.py
Normal file → Executable file
|
|
@ -140,7 +140,7 @@ class Button():
|
||||||
raise RuntimeError("Button not large enough for label")
|
raise RuntimeError("Button not large enough for label")
|
||||||
self.label = Label(label_font, text=label)
|
self.label = Label(label_font, text=label)
|
||||||
self.label.x = x + (width - dims[2]) // 2
|
self.label.x = x + (width - dims[2]) // 2
|
||||||
self.label.y = y + (height - dims[3])
|
self.label.y = y + height // 2
|
||||||
self.label.color = label_color
|
self.label.color = label_color
|
||||||
self.group.append(self.label)
|
self.group.append(self.label)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue