def drawRect_(self, rect): gradient = NSGradient.alloc().initWithColors_([ NSColor.colorWithDeviceRed_green_blue_alpha_( 121 / 256.0, 121 / 256.0, 121 / 256.0, 1), NSColor.colorWithDeviceRed_green_blue_alpha_( 111 / 256.0, 111 / 256.0, 111 / 256.0, 1) ]) gradient.drawInRect_angle_(rect, 90.0) NSView.drawRect_(self, rect)
def drawRect_(self, rect): gradient = NSGradient.alloc().initWithColors_( [NSColor.colorWithDeviceRed_green_blue_alpha_(121/256.0, 121/256.0, 121/256.0, 1), NSColor.colorWithDeviceRed_green_blue_alpha_(111/256.0, 111/256.0, 111/256.0, 1)]) gradient.drawInRect_angle_(rect, 90.0) NSView.drawRect_(self, rect)