mirror of
https://github.com/transmission/transmission
synced 2025-03-09 21:54:09 +00:00
swap the standard file table row height
This commit is contained in:
parent
da84461d9c
commit
2b7d630d54
3 changed files with 9 additions and 17 deletions
BIN
macosx/English.lproj/InfoWindow.nib/keyedobjects.nib
generated
BIN
macosx/English.lproj/InfoWindow.nib/keyedobjects.nib
generated
Binary file not shown.
|
@ -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]];
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue