浏览代码

wxGUI: Add dark mode support for vector attribute table manager (#793)

See also #591.
nilason 4 年之前
父节点
当前提交
28eee3a090
共有 1 个文件被更改,包括 1 次插入12 次删除
  1. 1 12
      gui/wxpython/dbmgr/base.py

+ 1 - 12
gui/wxpython/dbmgr/base.py

@@ -115,11 +115,7 @@ class VirtualAttributeList(ListCtrl,
                    message=e.value)
                    message=e.value)
             return
             return
 
 
-        # add some attributes (colourful background for each item rows)
-        self.attr1 = wx.ListItemAttr()
-        self.attr1.SetBackgroundColour(wx.Colour(238, 238, 238))
-        self.attr2 = wx.ListItemAttr()
-        self.attr2.SetBackgroundColour("white")
+        self.EnableAlternateRowColours()
         self.il = wx.ImageList(16, 16)
         self.il = wx.ImageList(16, 16)
         self.sm_up = self.il.Add(
         self.sm_up = self.il.Add(
             wx.ArtProvider.GetBitmap(
             wx.ArtProvider.GetBitmap(
@@ -436,13 +432,6 @@ class VirtualAttributeList(ListCtrl,
         s = self.itemDataMap[index][col]
         s = self.itemDataMap[index][col]
         return str(s)
         return str(s)
 
 
-    def OnGetItemAttr(self, item):
-        """Get item attributes"""
-        if (item % 2) == 0:
-            return self.attr2
-        else:
-            return self.attr1
-
     def OnColumnMenu(self, event):
     def OnColumnMenu(self, event):
         """Column heading right mouse button -> pop-up menu"""
         """Column heading right mouse button -> pop-up menu"""
         self._col = event.GetColumn()
         self._col = event.GetColumn()