Skip to content

Commit

Permalink
Style AutoListCtrl highlighting manually in dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
akauble committed Dec 13, 2023
1 parent 2a3c586 commit d1e1940
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gui/builtinItemStatsViews/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ def __init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, styl
wx.ListCtrl.__init__(self, parent, ID, pos, size, style)
listmix.ListCtrlAutoWidthMixin.__init__(self)
listmix.ListRowHighlighter.__init__(self)

if wx.SystemSettings.GetAppearance().IsDark():
listcol = wx.SystemSettings.GetColour(wx.SYS_COLOUR_LISTBOX)
highlight = listcol.ChangeLightness(110)
listmix.ListRowHighlighter.SetHighlightColor(self, highlight)

class AutoListCtrlNoHighlight(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ListRowHighlighter):
def __init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0):
Expand Down

0 comments on commit d1e1940

Please sign in to comment.