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

Method UpdateMainFrameAttribs

gui/mainFrame.py:317–345  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

315 self.fittingHeight = self.mainFrameAttribs["fitting_height"]
316
317 def UpdateMainFrameAttribs(self):
318 if self.IsIconized():
319 return
320
321 wndGlobalX, wndGlobalY = self.GetPosition()
322 displayData = self._getDisplayData()
323 wndDisplay = 0
324 wndX = 0
325 wndY = 0
326 for i, (sdX, sdY, sdW, sdH) in enumerate(displayData):
327 wndRelX = wndGlobalX - sdX
328 wndRelY = wndGlobalY - sdY
329 if 0 <= wndRelX < sdW and 0 <= wndRelY < sdH:
330 wndDisplay = i
331 wndX = wndRelX
332 wndY = wndRelY
333 break
334 self.mainFrameAttribs["wnd_display"] = wndDisplay
335 self.mainFrameAttribs["wnd_x"] = wndX
336 self.mainFrameAttribs["wnd_y"] = wndY
337
338 wndW, wndH = self.GetSize()
339 self.mainFrameAttribs["wnd_width"] = wndW
340 self.mainFrameAttribs["wnd_height"] = wndH
341 self.mainFrameAttribs["wnd_maximized"] = self.IsMaximized()
342
343 self.mainFrameAttribs["browser_width"] = self.notebookBrowsers.GetSize()[0]
344 self.mainFrameAttribs["market_height"] = self.marketBrowser.marketView.GetSize()[1]
345 self.mainFrameAttribs["fitting_height"] = self.fitting_additions_split.GetSashPosition()
346
347 def SetActiveStatsWindow(self, wnd):
348 self.activeStatsWnd = wnd

Callers 1

OnCloseMethod · 0.95

Calls 3

_getDisplayDataMethod · 0.95
GetPositionMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected