make image background views always opaque and other trivial changes

This commit is contained in:
Mitchell Livingston 2007-08-29 02:13:38 +00:00
parent 65ac0968ef
commit 0b1bc0cc8a
3 changed files with 8 additions and 5 deletions

View File

@ -1859,7 +1859,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
if (totalCount != 1)
[totalTorrentsString appendFormat: NSLocalizedString(@"%d Transfers", "Status bar transfer count"), totalCount];
else
[totalTorrentsString appendFormat: NSLocalizedString(@"1 Transfer", "Status bar transfer count")];
[totalTorrentsString appendString: NSLocalizedString(@"1 Transfer", "Status bar transfer count")];
[fTotalTorrentsField setStringValue: totalTorrentsString];
[totalTorrentsString release];

View File

@ -34,6 +34,11 @@
[self setNeedsDisplay: YES];
}
- (BOOL) isOpaque
{
return YES;
}
- (void) dealloc
{
[fBackgroundColor release];

View File

@ -35,8 +35,7 @@
if ((self = [super initWithCoder: decoder]))
{
fTorrent = nil;
int numPieces = MAX_ACROSS * MAX_ACROSS;
fPieces = malloc(numPieces);
fPieces = malloc(MAX_ACROSS * MAX_ACROSS);
}
return self;
@ -44,11 +43,10 @@
- (void) awakeFromNib
{
NSSize size = [self bounds].size;
NSBezierPath * bp = [NSBezierPath bezierPathWithRect: [self bounds]];
//back image
fBack = [[NSImage alloc] initWithSize: size];
fBack = [[NSImage alloc] initWithSize: [self bounds].size];
[fBack lockFocus];
[[NSColor colorWithCalibratedWhite: 0.0 alpha: 0.4] set];