Some minor updates, fixes, etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user