mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Fix CustomTreeCtrl/HyperTreeList background color
CustomTreeCtrl and HyperTreeList use wx.SYS_COLOUR_LISTBOX for their default background colors. This defaults to dank Grey on MSW/GTK/MacOS even though the TreeCtrl and ListCtrl on all three platforms default to a white background. Use a trick from UltimateListCtrl to take default colors from wx.ListCtrl. This can be seen in the demos, except that the CustomTreeCtrl demo forces its background to wx.WHITE. With these changes forcing the background color is no longer necessary and allows the controls to take on the native background color for themes that change it.
This commit is contained in:
@@ -1293,8 +1293,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
|
||||
|
||||
CT.CustomTreeCtrl.__init__(self, parent, id, pos, size, style, agwStyle)
|
||||
|
||||
self.SetBackgroundColour(wx.WHITE)
|
||||
|
||||
alldata = dir(CT)
|
||||
|
||||
treestyles = []
|
||||
|
||||
@@ -1052,7 +1052,7 @@ class HyperTreeListDemo(wx.Frame):
|
||||
splitter.SplitVertically(self.leftpanel, panel, 300)
|
||||
|
||||
splitter.SetMinimumPaneSize(120)
|
||||
self.leftpanel.SetBackgroundColour(wx.WHITE)
|
||||
#self.leftpanel.SetBackgroundColour(wx.WHITE)
|
||||
self.leftpanel.SetScrollRate(20, 20)
|
||||
|
||||
self.Fit()
|
||||
|
||||
Reference in New Issue
Block a user