]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/lib/buttons.py
Updates to make latest changes compile
[wxWidgets.git] / utils / wxPython / lib / buttons.py
index 9c4a79110a833d60cf8133e1c9a09b218cc80166..e02f28850e4c9e7c0ff9f31e24fef08b527356f9 100644 (file)
@@ -232,6 +232,7 @@ class wxGenButton(wxControl):
         if self.hasFocus and self.useFocusInd:
             self.DrawFocusIndicator(dc, width, height)
 
+
     def OnEraseBackground(self, event):
         pass
 
@@ -293,6 +294,7 @@ class wxGenButton(wxControl):
             self.Refresh()
         event.Skip()
 
+
     def OnKeyUp(self, event):
         if self.hasFocus and event.KeyCode() == ord(" "):
             self.up = true
@@ -361,7 +363,8 @@ class wxGenBitmapButton(wxGenButton):
         bw,bh = bmp.GetWidth(), bmp.GetHeight()
         if not self.up:
             dw = dy = 1
-        dc.DrawBitmap(bmp, (width-bw)/2+dw, (height-bh)/2+dy, true)
+        hasMask = bmp.GetMask() != None
+        dc.DrawBitmap(bmp, (width-bw)/2+dw, (height-bh)/2+dy, hasMask)