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

Method InitTabRegions

gui/chrome_tabs.py:546–558  ·  view source on GitHub ↗

Initializes regions for tab, which makes it easier to determine if given coordinates are included in a region

(self)

Source from the content-addressed store, hash-verified

544 self.tab_back_bitmap = bk_bmp
545
546 def InitTabRegions(self):
547 """
548 Initializes regions for tab, which makes it easier to determine if
549 given coordinates are included in a region
550 """
551 self.tab_region = wx.Region(self.tab_back_bitmap)
552 self.close_region = wx.Region(self.ctab_close_bmp)
553
554 x_offset = self.content_width \
555 + self.left_width \
556 - self.ctab_close_bmp.GetWidth() / 2
557 y_offset = (self.tab_height - self.ctab_close_bmp.GetHeight()) / 2
558 self.close_region.Offset(round(x_offset), round(y_offset))
559
560 def InitColors(self):
561 """Determines colors used for tab, based on system settings"""

Callers 1

InitTabMethod · 0.95

Calls 2

GetWidthMethod · 0.45
GetHeightMethod · 0.45

Tested by

no test coverage detected