def drawRect_(self, rect): VerticalBoxView.drawRect_(self, rect) if self.alternateRows: i = 0 NSColor.colorWithCalibratedRed_green_blue_alpha_(237/256.0, 243/256.0, 254/256.0, 1.0).set() for v in self.subviews(): if i % 2 == 1: NSRectFill(v.frame()) i += 1 if self.selection != -1 and self.selection < self.subviews().count(): if self.window().isKeyWindow(): NSColor.alternateSelectedControlColor().set() else: NSColor.lightGrayColor().set() NSRectFill(self.subviews()[self.selection].frame())
def drawRect_(self, rect): VerticalBoxView.drawRect_(self, rect) if self.alternateRows: i = 0 NSColor.colorWithCalibratedRed_green_blue_alpha_( 237 / 256.0, 243 / 256.0, 254 / 256.0, 1.0).set() for v in self.subviews(): if i % 2 == 1: NSRectFill(v.frame()) i += 1 if self.selection != -1 and self.selection < self.subviews().count(): if self.window().isKeyWindow(): NSColor.alternateSelectedControlColor().set() else: NSColor.lightGrayColor().set() NSRectFill(self.subviews()[self.selection].frame())
def updateButtons(self): for button in (self.holdButton, self.hangupButton, self.chatButton, self.infoButton, self.muteButton, self.aspectButton, self.contactsButton, self.fullscreenButton, self.myvideoButton, self.pauseButton): lightGrayTitle = NSAttributedString.alloc().initWithString_attributes_(button.label(), NSDictionary.dictionaryWithObject_forKey_(NSColor.lightGrayColor(), NSForegroundColorAttributeName)) button.setLabel_(lightGrayTitle)