1010from gui import globalEvents as GE
1111from gui .bitmap_loader import BitmapLoader
1212from gui .builtinItemStatsViews .attributeGrouping import *
13+ from gui .utils .colors import Colors
1314from gui .utils .numberFormatter import formatAmount , roundDec
1415from service .const import GuiAttrGroup
1516
@@ -26,15 +27,16 @@ class ItemParams(wx.Panel):
2627 def __init__ (self , parent , stuff , item , context = None ):
2728 # Had to manually set the size here, otherwise column widths couldn't be calculated correctly. See #1878
2829 wx .Panel .__init__ (self , parent , size = (1000 , 1000 ))
29- self .SetBackgroundColour (wx .SystemSettings .GetColour (wx .SYS_COLOUR_BTNFACE ))
30+ self .SetBackgroundColour (Colors .buttonFace ())
31+ self .SetForegroundColour (Colors .text ())
3032
3133 self .mainFrame = gui .mainFrame .MainFrame .getInstance ()
3234
3335 mainSizer = wx .BoxSizer (wx .VERTICAL )
3436
3537 self .paramList = wx .lib .agw .hypertreelist .HyperTreeList (self , wx .ID_ANY ,
3638 agwStyle = wx .TR_HIDE_ROOT | wx .TR_NO_LINES | wx .TR_FULL_ROW_HIGHLIGHT | wx .TR_HAS_BUTTONS )
37- self .paramList .SetBackgroundColour (wx . SystemSettings . GetColour ( wx . SYS_COLOUR_WINDOW ))
39+ self .paramList .SetBackgroundColour (Colors . windowBackground ( ))
3840
3941 mainSizer .Add (self .paramList , 1 , wx .ALL | wx .EXPAND , 0 )
4042 self .SetSizer (mainSizer )
@@ -209,7 +211,7 @@ def AddAttribute(self, parent, attr):
209211
210212 attrIcon , attrName , currentVal , baseVal = data
211213 attr_item = self .paramList .AppendItem (parent , attrName )
212- self .paramList .SetItemTextColour (attr_item , wx . SystemSettings . GetColour ( wx . SYS_COLOUR_WINDOWTEXT ))
214+ self .paramList .SetItemTextColour (attr_item , Colors . text ( ))
213215
214216 self .paramList .SetItemText (attr_item , currentVal , 1 )
215217 if self .stuff is not None :
@@ -238,7 +240,7 @@ def PopulateList(self):
238240 heading = data .get ("label" )
239241
240242 header_item = self .paramList .AppendItem (root , heading )
241- self .paramList .SetItemTextColour (header_item , wx . SystemSettings . GetColour ( wx . SYS_COLOUR_WINDOWTEXT ))
243+ self .paramList .SetItemTextColour (header_item , Colors . text ( ))
242244 for attr in data .get ("attributes" , []):
243245 # Attribute is a "grouped" attr (eg: damage, sensor strengths, etc). Automatically group these into a child item
244246 if attr in GroupedAttributes :
@@ -249,7 +251,7 @@ def PopulateList(self):
249251
250252 # create a child item with the groups label
251253 item = self .paramList .AppendItem (header_item , grouping [1 ])
252- self .paramList .SetItemTextColour (item , wx . SystemSettings . GetColour ( wx . SYS_COLOUR_WINDOWTEXT ))
254+ self .paramList .SetItemTextColour (item , Colors . text ( ))
253255 for attr2 in grouping [0 ]:
254256 # add each attribute in the group
255257 self .AddAttribute (item , attr2 )
@@ -274,7 +276,7 @@ def PopulateList(self):
274276
275277 # get all attributes in group
276278 item = self .paramList .AppendItem (root , grouping [1 ])
277- self .paramList .SetItemTextColour (item , wx . SystemSettings . GetColour ( wx . SYS_COLOUR_WINDOWTEXT ))
279+ self .paramList .SetItemTextColour (item , Colors . text ( ))
278280 for attr2 in grouping [0 ]:
279281 self .AddAttribute (item , attr2 )
280282
0 commit comments