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

Method InitBitmaps

gui/chrome_tabs.py:486–510  ·  view source on GitHub ↗

Creates bitmap for tab Takes the bitmaps already set and replaces a known color (black) with the needed color, while also considering selected state. Color dependant on platform -- see InitColors().

(self)

Source from the content-addressed store, hash-verified

484 self._Render()
485
486 def InitBitmaps(self):
487 """
488 Creates bitmap for tab
489
490 Takes the bitmaps already set and replaces a known color (black) with
491 the needed color, while also considering selected state. Color dependant
492 on platform -- see InitColors().
493 """
494 if self.selected:
495 tr, tg, tb, ta = self.selected_color
496 else:
497 tr, tg, tb, ta = self.inactive_color
498
499 ctab_left = self.ctab_left.Copy()
500 ctab_right = self.ctab_right.Copy()
501 ctab_middle = self.ctab_middle.Copy()
502
503 ctab_left.Replace(0, 0, 0, tr, tg, tb)
504 ctab_right.Replace(0, 0, 0, tr, tg, tb)
505 ctab_middle.Replace(0, 0, 0, tr, tg, tb)
506
507 self.ctab_left_bmp = wx.Bitmap(ctab_left)
508 self.ctab_right_bmp = wx.Bitmap(ctab_right)
509 self.ctab_middle_bmp = wx.Bitmap(ctab_middle)
510 self.ctab_close_bmp = wx.Bitmap(self.ctab_close)
511
512 def ComposeTabBack(self):
513 """

Callers 1

InitTabMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected