mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
Merge pull request #1392 from ThomasP0815/hypertreelist-issue-1389
Hypertreelist issue 1389
(cherry picked from commit bf2086e951)
This commit is contained in:
@@ -2974,10 +2974,9 @@ class TreeListMainWindow(CustomTreeCtrl):
|
||||
# except for custom item backgrounds, works for both kinds of theme.
|
||||
elif drawItemBackground:
|
||||
|
||||
itemrect = wx.Rect(0, item.GetY() + off_h, total_w-1, total_h - off_h)
|
||||
dc.SetBrush(wx.Brush(colBg))
|
||||
dc.DrawRectangle(itemrect)
|
||||
dc.SetTextForeground(colText)
|
||||
pass
|
||||
# We have to colour the item background for each column separately
|
||||
# So it is better to move this functionality in the subsequent for loop.
|
||||
|
||||
else:
|
||||
dc.SetTextForeground(colText)
|
||||
@@ -3110,6 +3109,22 @@ class TreeListMainWindow(CustomTreeCtrl):
|
||||
|
||||
dc.SetTextForeground(colText)
|
||||
|
||||
else:
|
||||
|
||||
if not item.IsSelected():
|
||||
|
||||
if self.HasAGWFlag(TR_FILL_WHOLE_COLUMN_BACKGROUND):
|
||||
itemrect = wx.Rect(text_x-2, item.GetY() + off_h, col_w-2*_MARGIN, total_h - off_h)
|
||||
else:
|
||||
itemrect = wx.Rect(text_x-2, item.GetY() + off_h, text_w+2*_MARGIN, total_h - off_h)
|
||||
colBgX = item.GetBackgroundColour(i)
|
||||
|
||||
if colBgX != None:
|
||||
dc.SetBrush(wx.Brush(colBgX, wx.SOLID))
|
||||
dc.SetPen(wx.TRANSPARENT_PEN)
|
||||
dc.DrawRectangle(itemrect)
|
||||
|
||||
|
||||
if self.HasAGWFlag(TR_COLUMN_LINES): # vertical lines between columns
|
||||
pen = wx.Pen(wx.SystemSettings.GetColour(wx.SYS_COLOUR_3DLIGHT), 1, wx.PENSTYLE_SOLID)
|
||||
dc.SetPen((self.GetBackgroundColour() == wx.WHITE and [pen] or [wx.WHITE_PEN])[0])
|
||||
|
||||
Reference in New Issue
Block a user