Hi all,
I fill in a TreeListCtrl with data and, according to some state, I
specify the row colours.
If I set both Text and Back colours, only the Back colour is retained
Tried this in the widget inspector:
- set the text col to yellow, color changes in tree
- set the back col to red, text color is reverted to black
The tree is created with wx.TR_HAS_VARIABLE_ROW_HEIGHT in styles
I browsed the sources and I changed
2074 # On GTK+ 2, drawing a 'normal' background is wrong
for themes that
2075 # don't allow backgrounds to be customized. Not
drawing the background,
2076 # except for custom item backgrounds, works for both
kinds of theme.
2077 elif drawItemBackground:
2078
2079 itemrect = wx.Rect(0, item.GetY() + off_h,
total_w-1, total_h - off_h)
2080 dc.SetBrush(wx.Brush(colBg, wx.SOLID))
2081 dc.DrawRectangleRect(itemrect)
2082
2083 else:
2084 dc.SetTextForeground(colText)
into
# On GTK+ 2, drawing a 'normal' background is wrong for themes that
# don't allow backgrounds to be customized. Not drawing the
background,
# except for custom item backgrounds, works for both kinds of theme.
else:
dc.SetTextForeground(colText)
if drawItemBackground:
itemrect = wx.Rect(0, item.GetY() + off_h, total_w-1, total_h
- off_h)
dc.SetBrush(wx.Brush(colBg, wx.SOLID))
dc.DrawRectangleRect(itemrect)
Don't know if there is any other case to be tested, works good in my
case