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

Method CalcButtonsBarPos

gui/builtinShipBrowser/raceSelector.py:109–122  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

107 event.Skip()
108
109 def CalcButtonsBarPos(self):
110
111 if self.layout == wx.HORIZONTAL:
112 rect = self.GetRect()
113 width = 0
114 height = 0
115 for bmp in self.raceBmps:
116 width += bmp.GetWidth() + self.buttonsPadding
117 height = max(bmp.GetHeight(), height)
118
119 posx = (rect.width - width) / 2
120 posy = (rect.height - height) / 2
121
122 self.buttonsBarPos = (posx, posy)
123
124 def OnLeftUp(self, event):
125

Callers 2

OnSizeUpdateMethod · 0.95
RebuildRacesMethod · 0.95

Calls 2

GetWidthMethod · 0.45
GetHeightMethod · 0.45

Tested by

no test coverage detected