MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / DrawItem

Method DrawItem

gui/builtinShipBrowser/navigationPanel.py:219–236  ·  view source on GitHub ↗
(self, mdc)

Source from the content-addressed store, hash-verified

217 self.bEditBoxWidth = rect.width - self.browserBoxX - self.padding
218
219 def DrawItem(self, mdc):
220 rect = self.GetRect()
221
222 windowColor = wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW)
223 textColor = colorUtils.GetSuitable(windowColor, 1)
224 sepColor = colorUtils.GetSuitable(windowColor, 0.2)
225
226 mdc.SetTextForeground(textColor)
227
228 self.UpdateElementsPos(mdc)
229 self.BrowserSearchBox.SetPosition((self.browserBoxX, self.browserBoxY))
230 self.BrowserSearchBox.SetSize(wx.Size(self.bEditBoxWidth, -1))
231
232 self.toolbar.SetPosition((self.toolbarx, self.toolbary))
233 mdc.SetFont(self.fontSmall)
234 mdc.DrawText(self.toolbar.hoverLabel, round(self.thoverx), round(self.thovery))
235 mdc.SetPen(wx.Pen(sepColor, 1))
236 mdc.DrawLine(0, rect.height - 1, rect.width, rect.height - 1)
237
238 def RenderBackground(self):
239 rect = self.GetRect()

Callers

nothing calls this directly

Calls 4

UpdateElementsPosMethod · 0.95
SetSizeMethod · 0.80
DrawTextMethod · 0.80
SetPositionMethod · 0.45

Tested by

no test coverage detected