1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

#1065 QL Zooming in the inspector wasn't zooming to the icon

This commit is contained in:
Mitchell Livingston 2008-06-30 19:52:18 +00:00
parent 8c293ee056
commit 658741d6bb
2 changed files with 6 additions and 4 deletions

View file

@ -116,8 +116,12 @@
- (NSRect) iconRectForRow: (int) row
{
FileNameCell * cell = (FileNameCell *)[[self tableColumnWithIdentifier: @"Name"] dataCell];
return [cell imageRectForBounds: [self rectOfRow: row]];
FileNameCell * cell = (FileNameCell *)[self preparedCellAtColumn: [self columnWithIdentifier: @"Name"] row: row];
NSRect iconRect = [cell imageRectForBounds: [self rectOfRow: row]];
iconRect.origin.x += [self frameOfOutlineCellAtRow: row].size.width;
iconRect.origin.x += [self indentationPerLevel] * (float)([self levelForRow: row] + ([[self itemAtRow: row] isFolder] ? 0 : 1));
return iconRect;
}
- (void) updateTrackingAreas

View file

@ -150,14 +150,12 @@
int comparisonOptions = [NSApp isOnLeopardOrBetter] ? (NSCaseInsensitiveSearch | NSNumericSearch
| NSWidthInsensitiveSearch | NSForcedOrderingSearch)
: (NSCaseInsensitiveSearch | NSNumericSearch);
return [self compare: string options: comparisonOptions range: NSMakeRange(0, [self length]) locale: [NSLocale currentLocale]];
}
- (NSComparisonResult) compareNumeric: (NSString *) string
{
int comparisonOptions = [NSApp isOnLeopardOrBetter] ? (NSNumericSearch | NSForcedOrderingSearch) : NSNumericSearch;
return [self compare: string options: comparisonOptions range: NSMakeRange(0, [self length]) locale: [NSLocale currentLocale]];
}