From b5c58d8fe307bbba8d415a4422c1ebbf8a715d27 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Wed, 6 Oct 2010 13:14:13 +0300 Subject: [PATCH] Make use of mixins.listctrl.ListRowHighlighter in itemstats listctrls to get things even more prettier --- gui/itemStats.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gui/itemStats.py b/gui/itemStats.py index b460f6eba..334139e95 100644 --- a/gui/itemStats.py +++ b/gui/itemStats.py @@ -122,12 +122,13 @@ class ItemStatsContainer ( wx.Panel ): ## Class AutoListCtrl ########################################################################### -class AutoListCtrl(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin): +class AutoListCtrl(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ListRowHighlighter): def __init__(self, parent, ID, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0): wx.ListCtrl.__init__(self, parent, ID, pos, size, style) listmix.ListCtrlAutoWidthMixin.__init__(self) + listmix.ListRowHighlighter.__init__(self, mode = 1) ########################################################################### @@ -155,7 +156,8 @@ class ItemParams (wx.Panel): mainSizer = wx.BoxSizer( wx.VERTICAL ) self.paramList = AutoListCtrl(self, wx.ID_ANY, - style = wx.LC_HRULES | wx.LC_NO_HEADER |wx.LC_REPORT |wx.LC_SINGLE_SEL |wx.LC_VRULES |wx.NO_BORDER) + style = #wx.LC_HRULES | + wx.LC_NO_HEADER |wx.LC_REPORT |wx.LC_SINGLE_SEL |wx.LC_VRULES |wx.NO_BORDER) mainSizer.Add( self.paramList, 1, wx.ALL|wx.EXPAND, 0 ) self.SetSizer( mainSizer ) @@ -222,7 +224,8 @@ class ItemEffects (wx.Panel): mainSizer = wx.BoxSizer( wx.VERTICAL ) self.effectList = AutoListCtrl(self, wx.ID_ANY, - style = wx.LC_HRULES | + style = + #wx.LC_HRULES | #wx.LC_NO_HEADER | wx.LC_REPORT |wx.LC_SINGLE_SEL |wx.LC_VRULES |wx.NO_BORDER) mainSizer.Add( self.effectList, 1, wx.ALL|wx.EXPAND, 0 ) @@ -265,7 +268,8 @@ class ItemAffectedBy (wx.Panel): mainSizer = wx.BoxSizer( wx.VERTICAL ) self.effectList = AutoListCtrl(self, wx.ID_ANY, - style = wx.LC_HRULES | + style = + #wx.LC_HRULES | wx.LC_NO_HEADER | wx.LC_REPORT |wx.LC_SINGLE_SEL | #wx.LC_VRULES |