create the display icon of torrents when needed (so if you only use minimal or regular view, it won't create the other icon)
This commit is contained in:
parent
9fc1829ac5
commit
1067a001d9
|
@ -531,13 +531,13 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
|
|
||||||
if (![fDefaults boolForKey: @"SmallView"])
|
if (![fDefaults boolForKey: @"SmallView"])
|
||||||
{
|
{
|
||||||
[info setObject: fIconFlipped forKey: @"Icon"];
|
[info setObject: [self iconFlipped] forKey: @"Icon"];
|
||||||
[info setObject: [self progressString] forKey: @"ProgressString"];
|
[info setObject: [self progressString] forKey: @"ProgressString"];
|
||||||
[info setObject: [self statusString] forKey: @"StatusString"];
|
[info setObject: [self statusString] forKey: @"StatusString"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[info setObject: fIconSmall forKey: @"Icon"];
|
[info setObject: [self iconSmall] forKey: @"Icon"];
|
||||||
[info setObject: [self remainingTimeString] forKey: @"RemainingTimeString"];
|
[info setObject: [self remainingTimeString] forKey: @"RemainingTimeString"];
|
||||||
[info setObject: [self shortStatusString] forKey: @"ShortStatusString"];
|
[info setObject: [self shortStatusString] forKey: @"ShortStatusString"];
|
||||||
}
|
}
|
||||||
|
@ -935,11 +935,23 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
|
|
||||||
- (NSImage *) iconFlipped
|
- (NSImage *) iconFlipped
|
||||||
{
|
{
|
||||||
|
if (!fIconFlipped)
|
||||||
|
{
|
||||||
|
fIconFlipped = [fIcon copy];
|
||||||
|
[fIconFlipped setFlipped: YES];
|
||||||
|
}
|
||||||
return fIconFlipped;
|
return fIconFlipped;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSImage *) iconSmall
|
- (NSImage *) iconSmall
|
||||||
{
|
{
|
||||||
|
if (!fIconSmall)
|
||||||
|
{
|
||||||
|
fIconSmall = [fIcon copy];
|
||||||
|
[fIconSmall setFlipped: YES];
|
||||||
|
[fIconSmall setScalesWhenResized: YES];
|
||||||
|
[fIconSmall setSize: NSMakeSize(16.0, 16.0)];
|
||||||
|
}
|
||||||
return fIconSmall;
|
return fIconSmall;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1562,13 +1574,6 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||||
fIcon = [[[NSWorkspace sharedWorkspace] iconForFileType: fInfo->multifile ? NSFileTypeForHFSTypeCode('fldr')
|
fIcon = [[[NSWorkspace sharedWorkspace] iconForFileType: fInfo->multifile ? NSFileTypeForHFSTypeCode('fldr')
|
||||||
: [[self name] pathExtension]] retain];
|
: [[self name] pathExtension]] retain];
|
||||||
|
|
||||||
fIconFlipped = [fIcon copy];
|
|
||||||
[fIconFlipped setFlipped: YES];
|
|
||||||
|
|
||||||
fIconSmall = [fIconFlipped copy];
|
|
||||||
[fIconSmall setScalesWhenResized: YES];
|
|
||||||
[fIconSmall setSize: NSMakeSize(16.0, 16.0)];
|
|
||||||
|
|
||||||
fProgressString = [[NSMutableString alloc] initWithCapacity: 50];
|
fProgressString = [[NSMutableString alloc] initWithCapacity: 50];
|
||||||
fStatusString = [[NSMutableString alloc] initWithCapacity: 75];
|
fStatusString = [[NSMutableString alloc] initWithCapacity: 75];
|
||||||
fShortStatusString = [[NSMutableString alloc] initWithCapacity: 30];
|
fShortStatusString = [[NSMutableString alloc] initWithCapacity: 30];
|
||||||
|
|
Loading…
Reference in New Issue