@@ -147,7 +147,7 @@ def __init__(
147
147
)
148
148
elif style == Button .SHADOWRECT :
149
149
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
151
151
)
152
152
self .body = Rect (
153
153
0 ,
@@ -159,7 +159,7 @@ def __init__(
159
159
)
160
160
elif style == Button .SHADOWROUNDRECT :
161
161
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
163
163
)
164
164
self .body = RoundRect (
165
165
0 ,
@@ -196,8 +196,8 @@ def label(self, newtext):
196
196
dims = self ._label .bounding_box
197
197
if dims [2 ] >= self .width or dims [3 ] >= self .height :
198
198
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
201
201
self ._label .color = self ._label_color
202
202
self .append (self ._label )
203
203
0 commit comments