From: Robin Dunn Date: Mon, 9 Aug 2004 23:17:09 +0000 (+0000) Subject: workaround for wxMac weirdness X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/89977ceb4e793c8102dd58868bdb56d37b52f430?ds=inline workaround for wxMac weirdness git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/wx/lib/colourselect.py b/wxPython/wx/lib/colourselect.py index f71329967e..787a1d925d 100644 --- a/wxPython/wx/lib/colourselect.py +++ b/wxPython/wx/lib/colourselect.py @@ -106,6 +106,11 @@ class ColourSelect(wx.BitmapButton): def MakeBitmap(self): bdr = 10 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)