Merge pull request #2 from makermelissa/master

Text Centers vertically much better
This commit is contained in:
Limor "Ladyada" Fried 2019-03-24 15:36:19 -04:00 committed by GitHub
commit d2413edf0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

2
adafruit_button.py Normal file → Executable file
View file

@ -140,7 +140,7 @@ class Button():
raise RuntimeError("Button not large enough for label")
self.label = Label(label_font, text=label)
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.group.append(self.label)