MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / RenderBackground

Method RenderBackground

gui/builtinShipBrowser/navigationPanel.py:238–265  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

236 mdc.DrawLine(0, rect.height - 1, rect.width, rect.height - 1)
237
238 def RenderBackground(self):
239 rect = self.GetRect()
240
241 windowColor = wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW)
242
243 sFactor = 0.1
244
245 shipGroupsFilter = getattr(self.shipBrowser, "filterShipsWithNoFits", None)
246 if shipGroupsFilter:
247 sFactor = 0.15
248 mFactor = 0.25
249 else:
250 mFactor = 0.2
251
252 eFactor = 0.1
253
254 if self.bkBitmap:
255 if self.bkBitmap.eFactor == eFactor and self.bkBitmap.sFactor == sFactor and self.bkBitmap.mFactor == mFactor \
256 and rect.width == self.bkBitmap.GetWidth() and rect.height == self.bkBitmap.GetHeight():
257 return
258 else:
259 del self.bkBitmap
260
261 self.bkBitmap = drawUtils.RenderGradientBar(windowColor, rect.width, rect.height, sFactor, eFactor, mFactor, 2)
262
263 self.bkBitmap.sFactor = sFactor
264 self.bkBitmap.eFactor = eFactor
265 self.bkBitmap.mFactor = mFactor
266
267 def gotoStage(self, stage, data=None):
268 self.shipBrowser.recentFits = False

Callers

nothing calls this directly

Calls 2

GetWidthMethod · 0.45
GetHeightMethod · 0.45

Tested by

no test coverage detected