# o Updated for 2.5 compatability.
#
+"""
+Provides a `ColourSelect` button that, when clicked, will display a
+colour selection dialog. The selected colour is displayed on the
+button itself.
+"""
+
#----------------------------------------------------------------------------
import wx
def MakeBitmap(self):
- bdr = 10
+ bdr = 8
width, height = self.GetSize()
+
+ # yes, this is weird, but it appears to work around a bug in wxMac
+ if "wxMac" in wx.PlatformInfo and width == height:
+ height -= 1
+
bmp = wx.EmptyBitmap(width-bdr, height-bdr)
dc = wx.MemoryDC()
dc.SelectObject(bmp)