X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5193b348e83ce2d8117e96ee269a099e2528f544..d1dc2b32e00303839aec0077aefcbc60bd712f00:/wxPython/wx/lib/buttons.py?ds=sidebyside diff --git a/wxPython/wx/lib/buttons.py b/wxPython/wx/lib/buttons.py index 833f176a57..acc7ee46a4 100644 --- a/wxPython/wx/lib/buttons.py +++ b/wxPython/wx/lib/buttons.py @@ -66,14 +66,19 @@ class GenButton(wx.PyControl): pos = wx.DefaultPosition, size = wx.DefaultSize, style = 0, validator = wx.DefaultValidator, name = "genbutton"): - if style == 0: - style = wx.NO_BORDER - wx.PyControl.__init__(self, parent, ID, pos, size, style, validator, name) + cstyle = style + if cstyle == 0: + cstyle = wx.NO_BORDER + wx.PyControl.__init__(self, parent, ID, pos, size, cstyle, validator, name) self.up = True - self.bezelWidth = 2 self.hasFocus = False - self.useFocusInd = True + if style & wx.NO_BORDER: + self.bezelWidth = 0 + self.useFocusInd = False + else: + self.bezelWidth = 2 + self.useFocusInd = True self.SetLabel(label) self.InheritAttributes()