X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8e425133fbdde2e2663e443bcaadf4a35914d845..cd9da200285e3c625be91768c9ca61dc218c94d0:/utils/wxPython/lib/buttons.py diff --git a/utils/wxPython/lib/buttons.py b/utils/wxPython/lib/buttons.py index 9c4a79110a..e02f28850e 100644 --- a/utils/wxPython/lib/buttons.py +++ b/utils/wxPython/lib/buttons.py @@ -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)