From 2fa74f64d36ecf158104ad8995aace74eb4c7989 Mon Sep 17 00:00:00 2001 From: "Pappenreiter.Thomas" Date: Wed, 9 Oct 2019 17:11:01 +0200 Subject: [PATCH 1/4] Merge branch 'master' from wxWidgets/Phoenix --- ext/wxWidgets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/wxWidgets b/ext/wxWidgets index 7fe94fe5..cd2e3dd2 160000 --- a/ext/wxWidgets +++ b/ext/wxWidgets @@ -1 +1 @@ -Subproject commit 7fe94fe5dd01d845633a3a6f271f9cd3dcebabd6 +Subproject commit cd2e3dd2cf2df4df386f843fee60b933736c2e47 From a359f487ab2a1e14cff7eaaecd9e4584a0dd3335 Mon Sep 17 00:00:00 2001 From: "Pappenreiter.Thomas" Date: Wed, 9 Oct 2019 17:26:12 +0200 Subject: [PATCH 2/4] fix issue 1389 --- wx/lib/agw/hypertreelist.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/wx/lib/agw/hypertreelist.py b/wx/lib/agw/hypertreelist.py index 93fd01ac..4c664545 100644 --- a/wx/lib/agw/hypertreelist.py +++ b/wx/lib/agw/hypertreelist.py @@ -2974,10 +2974,12 @@ 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) + """ else: dc.SetTextForeground(colText) @@ -3110,6 +3112,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]) From c1d47daf5fdf758ce12340ee7d17a735083cb340 Mon Sep 17 00:00:00 2001 From: "Pappenreiter.Thomas" Date: Thu, 10 Oct 2019 09:57:23 +0200 Subject: [PATCH 3/4] switching to newest wxwidgets commit --- ext/wxWidgets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/wxWidgets b/ext/wxWidgets index cd2e3dd2..7fe94fe5 160000 --- a/ext/wxWidgets +++ b/ext/wxWidgets @@ -1 +1 @@ -Subproject commit cd2e3dd2cf2df4df386f843fee60b933736c2e47 +Subproject commit 7fe94fe5dd01d845633a3a6f271f9cd3dcebabd6 From 9f96e69ed4a4b55f44009199ba20b382a1f6623a Mon Sep 17 00:00:00 2001 From: "Pappenreiter.Thomas" Date: Thu, 10 Oct 2019 10:23:07 +0200 Subject: [PATCH 4/4] Removing obsolte code block in hypertreelist --- wx/lib/agw/hypertreelist.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/wx/lib/agw/hypertreelist.py b/wx/lib/agw/hypertreelist.py index 4c664545..ed376fbd 100644 --- a/wx/lib/agw/hypertreelist.py +++ b/wx/lib/agw/hypertreelist.py @@ -2974,12 +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)