Skip to content

Commit 3bc9630

Browse files
author
Melissa LeBlanc-Williams
committedMar 23, 2019
Text centers vertically much better
1 parent 07c588b commit 3bc9630

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎adafruit_button.py

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def __init__(self, *, x, y, width, height, name=None, style=RECT,
140140
raise RuntimeError("Button not large enough for label")
141141
self.label = Label(label_font, text=label)
142142
self.label.x = x + (width - dims[2]) // 2
143-
self.label.y = y + (height - dims[3])
143+
self.label.y = y + height // 2
144144
self.label.color = label_color
145145
self.group.append(self.label)
146146

0 commit comments

Comments
 (0)
Please sign in to comment.