Changeset 3742


Ignore:
Timestamp:
Nov 7, 2007, 12:35:03 AM (14 years ago)
Author:
livings124
Message:

load the status bar background in the init method, because awakeFromNib drew the back with a white background on launch

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r3741 r3742  
    32663266            frame = NSMakeRect(pointX, oldFrame.origin.y, NSMaxX(oldFrame) - pointX, oldFrame.size.height);
    32673267   
    3268     BOOL show;
    3269     if (show = (frame.size.width >= SEARCH_FILTER_MIN_WIDTH))
     3268    BOOL show = frame.size.width >= SEARCH_FILTER_MIN_WIDTH;
     3269    if (show)
    32703270    {
    32713271        //make sure it is not too long
  • trunk/macosx/StatusBarView.m

    r3740 r3742  
    2828@implementation StatusBarView
    2929
    30 - (void) awakeFromNib
     30- (id) initWithFrame: (NSRect) rect
    3131{
    32     NSColor * beginningColor = [NSColor colorWithCalibratedRed: 208.0/255.0 green: 208.0/255.0 blue: 208.0/255.0 alpha: 1.0];
    33     NSColor * endingColor = [NSColor colorWithCalibratedRed: 233.0/255.0 green: 233.0/255.0 blue: 233.0/255.0 alpha: 1.0];
    34     fGradient = [[CTGradient gradientWithBeginningColor: beginningColor endingColor: endingColor] retain];
     32        if ((self = [super initWithFrame: rect]))
     33    {
     34        NSColor * beginningColor = [NSColor colorWithCalibratedRed: 208.0/255.0 green: 208.0/255.0 blue: 208.0/255.0 alpha: 1.0];
     35        NSColor * endingColor = [NSColor colorWithCalibratedRed: 233.0/255.0 green: 233.0/255.0 blue: 233.0/255.0 alpha: 1.0];
     36        fGradient = [[CTGradient gradientWithBeginningColor: beginningColor endingColor: endingColor] retain];
     37        }
     38        return self;
     39}
     40
     41- (void) dealloc
     42{
     43    [fGradient release];
     44    [super dealloc];
    3545}
    3646
Note: See TracChangeset for help on using the changeset viewer.