better group arrow images

This commit is contained in:
Mitchell Livingston 2008-02-18 20:53:10 +00:00
parent f43f30b7ac
commit 03f986dffe
6 changed files with 3700 additions and 3682 deletions

View File

@ -96,6 +96,8 @@
A23F4FF20D1D98AD002FCB97 /* PrefsWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A23F4FF00D1D98AD002FCB97 /* PrefsWindow.xib */; };
A23F50020D1D99D7002FCB97 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = A23F50000D1D99D7002FCB97 /* MainMenu.xib */; };
A241528B0C0261B8007DD3B4 /* Globe.png in Resources */ = {isa = PBXBuildFile; fileRef = A2FB06950BFF484A0095564D /* Globe.png */; };
A245030C0D6A1FB000B49D00 /* UpArrowGroupTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = A245030B0D6A1FB000B49D00 /* UpArrowGroupTemplate.png */; };
A245030E0D6A1FBC00B49D00 /* DownArrowGroupTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = A245030D0D6A1FBC00B49D00 /* DownArrowGroupTemplate.png */; };
A24621410C769D0900088E81 /* trevent.h in Headers */ = {isa = PBXBuildFile; fileRef = A24621350C769CF400088E81 /* trevent.h */; };
A24621420C769D0900088E81 /* trevent.c in Sources */ = {isa = PBXBuildFile; fileRef = A24621360C769CF400088E81 /* trevent.c */; };
A24872B60C9B6BB9000F5B92 /* Advanced.png in Resources */ = {isa = PBXBuildFile; fileRef = A24872B50C9B6BB9000F5B92 /* Advanced.png */; };
@ -473,6 +475,8 @@
A2399CCC0CD3852300225B2B /* NSApplicationAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSApplicationAdditions.m; path = macosx/NSApplicationAdditions.m; sourceTree = "<group>"; };
A23F4FF10D1D98AD002FCB97 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = macosx/English.lproj/PrefsWindow.xib; sourceTree = "<group>"; };
A23F50010D1D99D7002FCB97 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = macosx/English.lproj/MainMenu.xib; sourceTree = "<group>"; };
A245030B0D6A1FB000B49D00 /* UpArrowGroupTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = UpArrowGroupTemplate.png; path = macosx/Images/UpArrowGroupTemplate.png; sourceTree = "<group>"; };
A245030D0D6A1FBC00B49D00 /* DownArrowGroupTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = DownArrowGroupTemplate.png; path = macosx/Images/DownArrowGroupTemplate.png; sourceTree = "<group>"; };
A24621350C769CF400088E81 /* trevent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = trevent.h; path = libtransmission/trevent.h; sourceTree = "<group>"; };
A24621360C769CF400088E81 /* trevent.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = trevent.c; path = libtransmission/trevent.c; sourceTree = "<group>"; };
A24872B50C9B6BB9000F5B92 /* Advanced.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Advanced.png; path = macosx/Images/Advanced.png; sourceTree = "<group>"; };
@ -921,6 +925,8 @@
A2FB06950BFF484A0095564D /* Globe.png */,
A261A8250C6A0D68003BAFDA /* Error.png */,
A2F1511F0CD438BA001F3B0E /* Lock.png */,
A245030B0D6A1FB000B49D00 /* UpArrowGroupTemplate.png */,
A245030D0D6A1FBC00B49D00 /* DownArrowGroupTemplate.png */,
A29AF4F80D01BAEB00D097EC /* UpArrowTemplate.png */,
A29AF4F60D01BADC00D097EC /* DownArrowTemplate.png */,
A2F41DAA0D0B916B006CE378 /* YingYangTemplate.png */,
@ -1652,6 +1658,8 @@
A2623B4E0D3DC6DF0045D19A /* ActionHover.png in Resources */,
A24B65600D3F30870079EA4D /* QuitBadge.png in Resources */,
A2BB67790D5BA74600AB0618 /* OpenWeb.png in Resources */,
A245030C0D6A1FB000B49D00 /* UpArrowGroupTemplate.png in Resources */,
A245030E0D6A1FBC00B49D00 /* DownArrowGroupTemplate.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@ -2486,9 +2486,9 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
: NSLocalizedString(@"No Group", "Group table row");
}
else if ([ident isEqualToString: @"UL Image"])
return [NSImage imageNamed: @"UpArrowTemplate.png"];
return [NSImage imageNamed: @"UpArrowGroupTemplate.png"];
else if ([ident isEqualToString: @"DL Image"])
return [NSImage imageNamed: @"DownArrowTemplate.png"];
return [NSImage imageNamed: @"DownArrowGroupTemplate.png"];
else
{
BOOL upload = [ident isEqualToString: @"UL"];

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

View File

@ -61,7 +61,7 @@
fTorrentCell = [[TorrentCell alloc] init];
if (![NSApp isOnLeopardOrBetter])
[[self tableColumnWithIdentifier: @"Torrent"] setDataCell: fTorrentCell];
[[self tableColumnWithIdentifier: @"Group"] setDataCell: fTorrentCell];
NSData * groupData = [fDefaults dataForKey: @"CollapsedGroups"];
if (groupData)
@ -134,27 +134,37 @@
- (NSCell *) outlineView: (NSOutlineView *) outlineView dataCellForTableColumn: (NSTableColumn *) tableColumn item: (id) item
{
return !tableColumn && [item isKindOfClass: [Torrent class]] ? fTorrentCell : nil;
BOOL group = ![item isKindOfClass: [Torrent class]];
if (!tableColumn)
return !group ? fTorrentCell : nil;
else
return group ? [tableColumn dataCellForRow: [self rowForItem: item]] : nil;
}
- (void) outlineView: (NSOutlineView *) outlineView willDisplayCell: (id) cell forTableColumn: (NSTableColumn *) tableColumn
item: (id) item
{
if (![item isKindOfClass: [Torrent class]] || tableColumn)
return;
[cell setRepresentedObject: item];
int row = [self rowForItem: item];
[cell setControlHover: row == fMouseControlRow];
[cell setRevealHover: row == fMouseRevealRow];
[cell setActionHover: row == fMouseActionRow];
[cell setActionPushed: row == fActionPushedRow];
if ([item isKindOfClass: [Torrent class]])
{
[cell setRepresentedObject: item];
int row = [self rowForItem: item];
[cell setControlHover: row == fMouseControlRow];
[cell setRevealHover: row == fMouseRevealRow];
[cell setActionHover: row == fMouseActionRow];
[cell setActionPushed: row == fActionPushedRow];
}
else
{
if (([[tableColumn identifier] isEqualToString: @"UL Image"] || [[tableColumn identifier] isEqualToString: @"DL Image"])
&& [NSApp isOnLeopardOrBetter])
[[cell image] setTemplate: [cell backgroundStyle] == NSBackgroundStyleLowered]; //ensure white only when selected
}
}
- (NSRect) frameOfCellAtColumn: (NSInteger) column row: (NSInteger) row
{
if ([[self itemAtRow: row] isKindOfClass: [Torrent class]])
if (column == -1 || (![NSApp isOnLeopardOrBetter] && [[self itemAtRow: row] isKindOfClass: [Torrent class]]))
return [self rectOfRow: row];
else
return [super frameOfCellAtColumn: column row: row];
@ -185,7 +195,7 @@
NSDictionary * userInfo = [NSDictionary dictionaryWithObject: [NSNumber numberWithInt: row] forKey: @"Row"];
TorrentCell * cell = (TorrentCell *)[self preparedCellAtColumn: -1 row: row];
[cell addTrackingAreasForView: self inRect: [self frameOfCellAtColumn: 0 row: row] withUserInfo: userInfo
[cell addTrackingAreasForView: self inRect: [self rectOfRow: row] withUserInfo: userInfo
mouseLocation: mouseLocation];
}
}
@ -456,7 +466,7 @@
[fActionMenu appendItemsFromMenu: fileMenu atIndexes: [NSIndexSet indexSetWithIndexesInRange: range] atBottom: YES];
//place menu below button
NSRect rect = [fTorrentCell iconRectForBounds: [self frameOfCellAtColumn: 0 row: row]];
NSRect rect = [fTorrentCell iconRectForBounds: [self rectOfRow: row]];
NSPoint location = rect.origin;
location.y += rect.size.height + 5.0;
location = [self convertPoint: location toView: nil];
@ -654,7 +664,7 @@
if (row < 0 || ![[self itemAtRow: row] isKindOfClass: [Torrent class]])
return NO;
return NSPointInRect(point, [fTorrentCell controlButtonRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
return NSPointInRect(point, [fTorrentCell controlButtonRectForBounds: [self rectOfRow: row]]);
}
- (BOOL) pointInRevealRect: (NSPoint) point
@ -663,7 +673,7 @@
if (row < 0 || ![[self itemAtRow: row] isKindOfClass: [Torrent class]])
return NO;
return NSPointInRect(point, [fTorrentCell revealButtonRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
return NSPointInRect(point, [fTorrentCell revealButtonRectForBounds: [self rectOfRow: row]]);
}
- (BOOL) pointInActionRect: (NSPoint) point
@ -672,7 +682,7 @@
if (row < 0 || ![[self itemAtRow: row] isKindOfClass: [Torrent class]])
return NO;
return NSPointInRect(point, [fTorrentCell iconRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
return NSPointInRect(point, [fTorrentCell iconRectForBounds: [self rectOfRow: row]]);
}
- (BOOL) pointInProgressRect: (NSPoint) point
@ -689,7 +699,7 @@
cell = fTorrentCell;
[cell setRepresentedObject: [self itemAtRow: row]];
}
return NSPointInRect(point, [cell progressRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
return NSPointInRect(point, [cell progressRectForBounds: [self rectOfRow: row]]);
}
- (BOOL) pointInMinimalStatusRect: (NSPoint) point
@ -706,7 +716,7 @@
cell = fTorrentCell;
[cell setRepresentedObject: [self itemAtRow: row]];
}
return NSPointInRect(point, [cell minimalStatusRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
return NSPointInRect(point, [cell minimalStatusRectForBounds: [self rectOfRow: row]]);
}
- (void) updateFileMenu: (NSMenu *) menu forFiles: (NSArray *) files