]> git.saurik.com Git - wxWidgets.git/commitdiff
workaround for wxMac weirdness
authorRobin Dunn <robin@alldunn.com>
Mon, 9 Aug 2004 23:17:09 +0000 (23:17 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 9 Aug 2004 23:17:09 +0000 (23:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/lib/colourselect.py

index f71329967ea9df75b2a2fba89e8b2ea855b17380..787a1d925ddd061f7ceb48da17acf8cc7a13a70e 100644 (file)
@@ -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)