@@ -147,7 +147,7 @@ def __init__(
147147 )
148148 elif style == Button .SHADOWRECT :
149149 self .shadow = Rect (
150- 0 + 2 , 0 + 2 , width - 2 , height - 2 , fill = outline_color
150+ 2 , 2 , width - 2 , height - 2 , fill = outline_color
151151 )
152152 self .body = Rect (
153153 0 ,
@@ -159,7 +159,7 @@ def __init__(
159159 )
160160 elif style == Button .SHADOWROUNDRECT :
161161 self .shadow = RoundRect (
162- 0 + 2 , 0 + 2 , width - 2 , height - 2 , r = 10 , fill = self .outline_color
162+ 2 , 2 , width - 2 , height - 2 , r = 10 , fill = self .outline_color
163163 )
164164 self .body = RoundRect (
165165 0 ,
@@ -196,8 +196,8 @@ def label(self, newtext):
196196 dims = self ._label .bounding_box
197197 if dims [2 ] >= self .width or dims [3 ] >= self .height :
198198 raise RuntimeError ("Button not large enough for label" )
199- self ._label .x = 0 + (self .width - dims [2 ]) // 2
200- self ._label .y = 0 + self .height // 2
199+ self ._label .x = (self .width - dims [2 ]) // 2
200+ self ._label .y = self .height // 2
201201 self ._label .color = self ._label_color
202202 self .append (self ._label )
203203
0 commit comments