1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-08 21:04:25 +00:00

Make more images static.

This commit is contained in:
Mitchell Livingston 2006-06-16 01:50:10 +00:00
parent 84ae6d401d
commit 338b2a6a19
2 changed files with 20 additions and 20 deletions

View file

@ -32,7 +32,7 @@
- (void) placeBar: (NSImage *) barImage width: (float) width point: (NSPoint) point;
- (void) buildSimpleBar: (float) width point: (NSPoint) point;
- (void) buildAdvancedBar: (float) width point: (NSPoint) point;
- (void) buildAdvancedBar: (float) widthFloat point: (NSPoint) point;
@end

View file

@ -44,8 +44,18 @@
@implementation TorrentTableView
static NSImage * fResumeOnIcon, * fResumeOffIcon, * fPauseOnIcon, * fPauseOffIcon,
* fRevealOnIcon, * fRevealOffIcon;
- (void) awakeFromNib
{
fResumeOnIcon = [NSImage imageNamed: @"ResumeOn.png"];
fResumeOffIcon = [NSImage imageNamed: @"ResumeOff.png"];
fPauseOnIcon = [NSImage imageNamed: @"PauseOn.png"];
fPauseOffIcon = [NSImage imageNamed: @"PauseOff.png"];
fRevealOnIcon = [NSImage imageNamed: @"RevealOn.png"];
fRevealOffIcon = [NSImage imageNamed: @"RevealOff.png"];
[fContextRow setTitle: @"Context"];
[fContextNoRow setTitle: @"Context"];
}
@ -145,21 +155,13 @@
{
torrent = [fTorrents objectAtIndex: i];
rect = [self pauseRectForRow: i];
image = nil;
if ([torrent isPaused])
{
image = NSPointInRect( fClickPoint, rect ) ?
[NSImage imageNamed: @"ResumeOn.png"] :
[NSImage imageNamed: @"ResumeOff.png"];
}
image = NSPointInRect(fClickPoint, rect) ? fResumeOnIcon : fResumeOffIcon;
else if ([torrent isActive])
{
image = NSPointInRect( fClickPoint, rect ) ?
[NSImage imageNamed: @"PauseOn.png"] :
[NSImage imageNamed: @"PauseOff.png"];
}
else;
image = NSPointInRect(fClickPoint, rect) ? fPauseOnIcon : fPauseOffIcon;
else
image = nil;
if (image)
{
@ -170,9 +172,7 @@
}
rect = [self revealRectForRow: i];
image = NSPointInRect( fClickPoint, rect ) ?
[NSImage imageNamed: @"RevealOn.png"] :
[NSImage imageNamed: @"RevealOff.png"];
image = NSPointInRect(fClickPoint, rect) ? fRevealOnIcon : fRevealOffIcon;
[image setFlipped: YES];
[image drawAtPoint: rect.origin fromRect:
NSMakeRect(0, 0, BUTTON_WIDTH, BUTTON_WIDTH) operation: