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

Method ShowActive

gui/chrome_tabs.py:277–300  ·  view source on GitHub ↗

Sets the size of the page and shows. The sizing logic adjusts for some minor sizing errors (scrollbars going beyond bounds) resize_only if we are not interested in showing the page, only setting the size @todo: is resize_only still needed? Was in

(self, resize_only=False)

Source from the content-addressed store, hash-verified

275 self._pages[src], self._pages[dst] = self._pages[dst], self._pages[src]
276
277 def ShowActive(self, resize_only=False):
278 """
279 Sets the size of the page and shows. The sizing logic adjusts for some
280 minor sizing errors (scrollbars going beyond bounds)
281
282 resize_only
283 if we are not interested in showing the page, only setting the size
284
285 @todo: is resize_only still needed? Was introduced with 8b8b97 in mid
286 2011 to fix a resizing bug with blank _pages, cannot reproduce
287 13Sept2014
288 """
289
290 ww, wh = self.page_container.GetSize()
291 bx, by = self.GetBorders()
292 ww -= bx * 4
293 wh -= by * 4
294 self._active_page.SetSize((max(ww, -1), max(wh, -1)))
295 self._active_page.SetPosition((0, 0))
296
297 if not resize_only:
298 self._active_page.Show()
299
300 self.Layout()
301
302 def IsActive(self, page):
303 return self._active_page == page

Callers 5

SetPageMethod · 0.95
AddPageMethod · 0.95
SetSelectionMethod · 0.95
DeletePageMethod · 0.95
OnSizeMethod · 0.95

Calls 5

GetBordersMethod · 0.95
SetSizeMethod · 0.80
GetSizeMethod · 0.45
SetPositionMethod · 0.45
ShowMethod · 0.45

Tested by

no test coverage detected