move the item slot colours to config and use it from there

This commit is contained in:
Tony Cook
2019-03-01 19:47:04 +11:00
parent af17a4f1c9
commit 9bdb4ea967
3 changed files with 13 additions and 15 deletions

View File

@@ -40,6 +40,7 @@ from gui.contextMenu import ContextMenu
from gui.utils.staticHelpers import DragDropHelper
from service.fit import Fit
from service.market import Market
from config import slotColourMap
pyfalog = Logger(__name__)
@@ -629,14 +630,8 @@ class FittingView(d.Display):
else:
event.Skip()
slotColourMap = {1: wx.Colour(250, 235, 204), # yellow = low slots
2: wx.Colour(188, 215, 241), # blue = mid slots
3: wx.Colour(235, 204, 209), # red = high slots
4: '',
5: ''}
def slotColour(self, slot):
return self.slotColourMap.get(slot) or self.GetBackgroundColour()
return slotColourMap.get(slot) or self.GetBackgroundColour()
def refresh(self, stuff):
"""