mirror of
https://github.com/transmission/transmission
synced 2024-12-25 17:17:31 +00:00
#1065 QL Zooming in the inspector wasn't zooming to the icon
This commit is contained in:
parent
8c293ee056
commit
658741d6bb
2 changed files with 6 additions and 4 deletions
|
@ -116,8 +116,12 @@
|
||||||
|
|
||||||
- (NSRect) iconRectForRow: (int) row
|
- (NSRect) iconRectForRow: (int) row
|
||||||
{
|
{
|
||||||
FileNameCell * cell = (FileNameCell *)[[self tableColumnWithIdentifier: @"Name"] dataCell];
|
FileNameCell * cell = (FileNameCell *)[self preparedCellAtColumn: [self columnWithIdentifier: @"Name"] row: row];
|
||||||
return [cell imageRectForBounds: [self rectOfRow: 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
|
- (void) updateTrackingAreas
|
||||||
|
|
|
@ -150,14 +150,12 @@
|
||||||
int comparisonOptions = [NSApp isOnLeopardOrBetter] ? (NSCaseInsensitiveSearch | NSNumericSearch
|
int comparisonOptions = [NSApp isOnLeopardOrBetter] ? (NSCaseInsensitiveSearch | NSNumericSearch
|
||||||
| NSWidthInsensitiveSearch | NSForcedOrderingSearch)
|
| NSWidthInsensitiveSearch | NSForcedOrderingSearch)
|
||||||
: (NSCaseInsensitiveSearch | NSNumericSearch);
|
: (NSCaseInsensitiveSearch | NSNumericSearch);
|
||||||
|
|
||||||
return [self compare: string options: comparisonOptions range: NSMakeRange(0, [self length]) locale: [NSLocale currentLocale]];
|
return [self compare: string options: comparisonOptions range: NSMakeRange(0, [self length]) locale: [NSLocale currentLocale]];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSComparisonResult) compareNumeric: (NSString *) string
|
- (NSComparisonResult) compareNumeric: (NSString *) string
|
||||||
{
|
{
|
||||||
int comparisonOptions = [NSApp isOnLeopardOrBetter] ? (NSNumericSearch | NSForcedOrderingSearch) : NSNumericSearch;
|
int comparisonOptions = [NSApp isOnLeopardOrBetter] ? (NSNumericSearch | NSForcedOrderingSearch) : NSNumericSearch;
|
||||||
|
|
||||||
return [self compare: string options: comparisonOptions range: NSMakeRange(0, [self length]) locale: [NSLocale currentLocale]];
|
return [self compare: string options: comparisonOptions range: NSMakeRange(0, [self length]) locale: [NSLocale currentLocale]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue