mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-07-21 12:41:10 +02:00
Make sure the default button face color is not one with a fully transparent alpha
This commit is contained in:
@@ -172,7 +172,11 @@ class GenButton(wx.Control):
|
||||
self.SetLabel(label)
|
||||
self.InheritAttributes()
|
||||
self.SetInitialSize(size)
|
||||
self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE))
|
||||
face = wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE)
|
||||
if 'wxMac' in wx.PlatformInfo and face.alpha == 0:
|
||||
face = wx.SystemSettings.GetColour(wx.SYS_COLOUR_3DLIGHT)
|
||||
assert face.alpha != 0, "a different default system colour is needed!"
|
||||
self.SetBackgroundColour(face)
|
||||
|
||||
self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
|
||||
self.Bind(wx.EVT_LEFT_UP, self.OnLeftUp)
|
||||
|
@@ -149,8 +149,8 @@ class CustomColourData(object):
|
||||
|
||||
class ColourSelect(wx.lib.buttons.GenBitmapButton):
|
||||
"""
|
||||
A subclass of :class:`wx.BitmapButton` that, when clicked, will
|
||||
display a colour selection dialog.
|
||||
A subclass of :class:`wx.lib.buttons.GenBitmapButton` that,
|
||||
when clicked, will display a colour selection dialog.
|
||||
"""
|
||||
|
||||
def __init__(self, parent, id=wx.ID_ANY, label="", colour=wx.BLACK,
|
||||
|
Reference in New Issue
Block a user