swap the standard file table row height

This commit is contained in:
Mitchell Livingston 2007-01-19 15:30:41 +00:00
parent da84461d9c
commit 2b7d630d54
3 changed files with 9 additions and 17 deletions

View File

@ -54,9 +54,9 @@
if (![[item objectForKey: @"IsFolder"] boolValue]) if (![[item objectForKey: @"IsFolder"] boolValue])
{ {
NSDictionary * statusAttributes = [[NSDictionary alloc] initWithObjectsAndKeys: NSDictionary * statusAttributes = [[NSDictionary alloc] initWithObjectsAndKeys:
highlighted ? [NSColor whiteColor] : [NSColor darkGrayColor], NSForegroundColorAttributeName, highlighted ? [NSColor whiteColor] : [NSColor darkGrayColor], NSForegroundColorAttributeName,
[NSFont messageFontOfSize: 9.0], NSFontAttributeName, [NSFont messageFontOfSize: 9.0], NSFontAttributeName,
paragraphStyle, NSParagraphStyleAttributeName, nil]; paragraphStyle, NSParagraphStyleAttributeName, nil];
NSString * statusString = [NSString stringForFileSize: [[item objectForKey: @"Size"] unsignedLongLongValue]]; NSString * statusString = [NSString stringForFileSize: [[item objectForKey: @"Size"] unsignedLongLongValue]];

View File

@ -28,7 +28,7 @@
#define MIN_WINDOW_WIDTH 300 #define MIN_WINDOW_WIDTH 300
#define MAX_WINDOW_WIDTH 5000 #define MAX_WINDOW_WIDTH 5000
#define FILE_ROW_LARGE_HEIGHT 34.0 #define FILE_ROW_SMALL_HEIGHT 18.0
#define TAB_INFO_IDENT @"Info" #define TAB_INFO_IDENT @"Info"
#define TAB_ACTIVITY_IDENT @"Activity" #define TAB_ACTIVITY_IDENT @"Activity"
@ -754,10 +754,7 @@
[cell setImage: icon]; [cell setImage: icon];
} }
else if ([[tableColumn identifier] isEqualToString: @"Check"]) else if ([[tableColumn identifier] isEqualToString: @"Check"])
{
//always enable if mixed or off because clicking will turn on
[cell setEnabled: NO]; [cell setEnabled: NO];
}
else; else;
} }
@ -765,12 +762,7 @@
tableColumn: (NSTableColumn *) tableColumn item: (id) item mouseLocation: (NSPoint) mouseLocation tableColumn: (NSTableColumn *) tableColumn item: (id) item mouseLocation: (NSPoint) mouseLocation
{ {
NSString * ident = [tableColumn identifier]; NSString * ident = [tableColumn identifier];
#warning change if ([ident isEqualToString: @"Name"])
/*if ([ident isEqualToString: @"Size"])
return ![[item objectForKey: @"IsFolder"] boolValue]
? [[[item objectForKey: @"Size"] stringValue] stringByAppendingString: NSLocalizedString(@" bytes",
"Inspector -> Files tab -> table row tooltip")] : nil;
else*/ if ([ident isEqualToString: @"Name"])
return [[[fTorrents objectAtIndex: 0] downloadFolder] stringByAppendingPathComponent: [item objectForKey: @"Path"]]; return [[[fTorrents objectAtIndex: 0] downloadFolder] stringByAppendingPathComponent: [item objectForKey: @"Path"]];
else else
return nil; return nil;
@ -778,10 +770,10 @@
- (float) outlineView: (NSOutlineView *) outlineView heightOfRowByItem: (id) item - (float) outlineView: (NSOutlineView *) outlineView heightOfRowByItem: (id) item
{ {
float height = [outlineView rowHeight]; if ([[item objectForKey: @"IsFolder"] boolValue])
if (![[item objectForKey: @"IsFolder"] boolValue]) return FILE_ROW_SMALL_HEIGHT;
height = FILE_ROW_LARGE_HEIGHT; else
return height; return [outlineView rowHeight];
} }
- (NSArray *) peerSortDescriptors - (NSArray *) peerSortDescriptors