@@ -124,7 +124,6 @@ def getExampleEntries():
124
124
)
125
125
126
126
127
-
128
127
class DemoWindow (object ):
129
128
130
129
def __init__ (self , filename = None ):
@@ -171,15 +170,23 @@ def __init__(self, filename=None):
171
170
self .output_lbl = Label (root , height = 1 , text = " --- " , bg = "#ddf" ,
172
171
font = ("Arial" , 16 , 'normal' ), borderwidth = 2 ,
173
172
relief = RIDGE )
174
- self .start_btn = Button (root , text = " START " , font = btnfont ,
175
- fg = "white" , disabledforeground = "#fed" ,
176
- command = self .startDemo )
177
- self .stop_btn = Button (root , text = " STOP " , font = btnfont ,
178
- fg = "white" , disabledforeground = "#fed" ,
179
- command = self .stopIt )
180
- self .clear_btn = Button (root , text = " CLEAR " , font = btnfont ,
181
- fg = "white" , disabledforeground = "#fed" ,
182
- command = self .clearCanvas )
173
+ if darwin : # Leave Mac button colors alone - #44254.
174
+ self .start_btn = Button (root , text = " START " , font = btnfont ,
175
+ fg = '#00cc22' , command = self .startDemo )
176
+ self .stop_btn = Button (root , text = " STOP " , font = btnfont ,
177
+ fg = '#00cc22' , command = self .stopIt )
178
+ self .clear_btn = Button (root , text = " CLEAR " , font = btnfont ,
179
+ fg = '#00cc22' , command = self .clearCanvas )
180
+ else :
181
+ self .start_btn = Button (root , text = " START " , font = btnfont ,
182
+ fg = "white" , disabledforeground = "#fed" ,
183
+ command = self .startDemo )
184
+ self .stop_btn = Button (root , text = " STOP " , font = btnfont ,
185
+ fg = "white" , disabledforeground = "#fed" ,
186
+ command = self .stopIt )
187
+ self .clear_btn = Button (root , text = " CLEAR " , font = btnfont ,
188
+ fg = "white" , disabledforeground = "#fed" ,
189
+ command = self .clearCanvas )
183
190
self .output_lbl .grid (row = 1 , column = 0 , sticky = 'news' , padx = (0 ,5 ))
184
191
self .start_btn .grid (row = 1 , column = 1 , sticky = 'ew' )
185
192
self .stop_btn .grid (row = 1 , column = 2 , sticky = 'ew' )
@@ -267,12 +274,17 @@ def update_mousewheel(self, event):
267
274
return self .increase_size ()
268
275
269
276
def configGUI (self , start , stop , clear , txt = "" , color = "blue" ):
270
- self .start_btn .config (state = start ,
271
- bg = "#d00" if start == NORMAL else "#fca" )
272
- self .stop_btn .config (state = stop ,
273
- bg = "#d00" if stop == NORMAL else "#fca" )
274
- self .clear_btn .config (state = clear ,
275
- bg = "#d00" if clear == NORMAL else "#fca" )
277
+ if darwin : # Leave Mac button colors alone - #44254.
278
+ self .start_btn .config (state = start )
279
+ self .stop_btn .config (state = stop )
280
+ self .clear_btn .config (state = clear )
281
+ else :
282
+ self .start_btn .config (state = start ,
283
+ bg = "#d00" if start == NORMAL else "#fca" )
284
+ self .stop_btn .config (state = stop ,
285
+ bg = "#d00" if stop == NORMAL else "#fca" )
286
+ self .clear_btn .config (state = clear ,
287
+ bg = "#d00" if clear == NORMAL else "#fca" )
276
288
self .output_lbl .config (text = txt , fg = color )
277
289
278
290
def makeLoadDemoMenu (self , master ):
0 commit comments