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

Method UpdateElementsPos

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

Source from the content-addressed store, hash-verified

197 return wx.Bitmap(img)
198
199 def UpdateElementsPos(self, mdc):
200 rect = self.GetRect()
201
202 self.toolbarx = self.padding
203 self.toolbary = (rect.height - self.toolbar.GetHeight()) / 2
204
205 mdc.SetFont(self.fontSmall)
206
207 wlabel, hlabel = mdc.GetTextExtent(self.toolbar.hoverLabel)
208
209 self.thoverx = self.toolbar.GetWidth() + self.padding
210 self.thovery = (rect.height - hlabel) / 2
211 self.thoverw = wlabel
212
213 self.browserBoxX = self.thoverx
214 bEditBoxWidth, bEditBoxHeight = self.BrowserSearchBox.GetSize()
215 self.browserBoxY = (rect.height - bEditBoxHeight) / 2
216
217 self.bEditBoxWidth = rect.width - self.browserBoxX - self.padding
218
219 def DrawItem(self, mdc):
220 rect = self.GetRect()

Callers 1

DrawItemMethod · 0.95

Calls 3

GetHeightMethod · 0.45
GetWidthMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected