Patch #1645253, fixes overflow error

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-01-26 20:14:33 +00:00
parent d93d8a12ef
commit f4d0946dcf

View File

@@ -1790,7 +1790,9 @@ class CustomTreeCtrl(wx.PyScrolledWindow):
btnshadow = wx.SystemSettings_GetColour(wx.SYS_COLOUR_BTNSHADOW)
self._hilightUnfocusedBrush = wx.Brush(btnshadow)
r, g, b = btnshadow.Red(), btnshadow.Green(), btnshadow.Blue()
backcolour = ((r >> 1) - 20, (g >> 1) - 20, (b >> 1) - 20)
backcolour = (max((r >> 1) - 20, 0),
max((g >> 1) - 20, 0),
max((b >> 1) - 20, 0))
backcolour = wx.Colour(backcolour[0], backcolour[1], backcolour[2])
self._hilightUnfocusedBrush2 = wx.Brush(backcolour)