mirror of
https://github.com/transmission/transmission.git
synced 2025-12-27 05:38:40 +00:00
load the status bar background in the init method, because awakeFromNib drew the back with a white background on launch
This commit is contained in:
@@ -3265,8 +3265,8 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
||||
NSRect oldFrame = [fSearchFilterField frame],
|
||||
frame = NSMakeRect(pointX, oldFrame.origin.y, NSMaxX(oldFrame) - pointX, oldFrame.size.height);
|
||||
|
||||
BOOL show;
|
||||
if (show = (frame.size.width >= SEARCH_FILTER_MIN_WIDTH))
|
||||
BOOL show = frame.size.width >= SEARCH_FILTER_MIN_WIDTH;
|
||||
if (show)
|
||||
{
|
||||
//make sure it is not too long
|
||||
if (frame.size.width > SEARCH_FILTER_MAX_WIDTH)
|
||||
|
||||
@@ -27,11 +27,21 @@
|
||||
|
||||
@implementation StatusBarView
|
||||
|
||||
- (void) awakeFromNib
|
||||
- (id) initWithFrame: (NSRect) rect
|
||||
{
|
||||
NSColor * beginningColor = [NSColor colorWithCalibratedRed: 208.0/255.0 green: 208.0/255.0 blue: 208.0/255.0 alpha: 1.0];
|
||||
NSColor * endingColor = [NSColor colorWithCalibratedRed: 233.0/255.0 green: 233.0/255.0 blue: 233.0/255.0 alpha: 1.0];
|
||||
fGradient = [[CTGradient gradientWithBeginningColor: beginningColor endingColor: endingColor] retain];
|
||||
if ((self = [super initWithFrame: rect]))
|
||||
{
|
||||
NSColor * beginningColor = [NSColor colorWithCalibratedRed: 208.0/255.0 green: 208.0/255.0 blue: 208.0/255.0 alpha: 1.0];
|
||||
NSColor * endingColor = [NSColor colorWithCalibratedRed: 233.0/255.0 green: 233.0/255.0 blue: 233.0/255.0 alpha: 1.0];
|
||||
fGradient = [[CTGradient gradientWithBeginningColor: beginningColor endingColor: endingColor] retain];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[fGradient release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (BOOL) isOpaque
|
||||
|
||||
Reference in New Issue
Block a user