X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d4b73b1b8e585418459362c9bf9173aa21da8c41..3d2d9036037d9ee51f47d878c3dcef4af4a6ef41:/wxPython/wx/lib/colourchooser/pycolourbox.py diff --git a/wxPython/wx/lib/colourchooser/pycolourbox.py b/wxPython/wx/lib/colourchooser/pycolourbox.py index 9cc9b5f3b2..a1108c7b1c 100644 --- a/wxPython/wx/lib/colourchooser/pycolourbox.py +++ b/wxPython/wx/lib/colourchooser/pycolourbox.py @@ -33,12 +33,12 @@ class PyColourBox(wx.Panel): def __init__(self, parent, id, colour=(0, 0, 0), size=(25, 20)): """Creates a new colour box instance and initializes the colour content.""" - wx.Panel.__init__(self, parent, id, size=size) + wx.Panel.__init__(self, parent, id, size=size, style=wx.NO_BORDER) - self.colour_box = wx.Panel(self, -1, style=wx.SIMPLE_BORDER) + self.colour_box = wx.Window(self, -1, style=wx.SIMPLE_BORDER) sizer = wx.GridSizer(1, 1) - sizer.Add(self.colour_box, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL) + sizer.Add(self.colour_box, 0, wx.FIXED_MINSIZE | wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL) sizer.SetItemMinSize(self.colour_box, size[0] - 5, size[1] - 5) self.SetAutoLayout(True) self.SetSizer(sizer)