diff --git a/macosx/TorrentCell.h b/macosx/TorrentCell.h index f8609ae24..e42d8bb0d 100644 --- a/macosx/TorrentCell.h +++ b/macosx/TorrentCell.h @@ -37,7 +37,7 @@ int8_t * fPieces; } -- (NSRect) imageRectForBounds: (NSRect) bounds; +- (NSRect) iconRectForBounds: (NSRect) bounds; - (NSRect) titleRectForBounds: (NSRect) bounds; - (NSRect) progressRectForBounds: (NSRect) bounds; - (NSRect) barRectForBounds: (NSRect) bounds; diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index d92dc240f..4bb4cf80c 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -115,7 +115,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 [super dealloc]; } -- (NSRect) imageRectForBounds: (NSRect) bounds +- (NSRect) iconRectForBounds: (NSRect) bounds { NSRect result = bounds; @@ -192,7 +192,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 //icon NSImage * icon = minimal ? (error ? fErrorImage : [torrent iconSmall]) : [torrent iconFlipped]; - NSRect iconRect = [self imageRectForBounds: cellFrame]; + NSRect iconRect = [self iconRectForBounds: cellFrame]; [icon drawInRect: iconRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: 1.0]; if (error && !minimal) diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index f9b1f61fc..96004a895 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -34,8 +34,6 @@ @interface TorrentTableView (Private) -- (NSRect) iconRectForRow: (int) row; - - (NSRect) pauseRectForRow: (int) row; - (NSRect) revealRectForRow: (int) row; - (NSRect) actionRectForRow: (int) row; @@ -487,10 +485,13 @@ - (NSRect) actionRectForRow: (int) row { - if ([fDefaults boolForKey: @"SmallView"]) - return [self iconRectForRow: row]; - else if (row < 0) + if (row < 0) return NSZeroRect; + else if ([fDefaults boolForKey: @"SmallView"]) + { + TorrentCell * cell = [[self tableColumnWithIdentifier: @"Torrent"] dataCell]; + return [cell iconRectForBounds: [self frameOfCellAtColumn: 0 row: row]]; + } else; NSRect cellRect = [self frameOfCellAtColumn: [self columnWithIdentifier: @"Torrent"] row: row]; @@ -506,7 +507,8 @@ if (row < 0) return NO; - return NSPointInRect(point, [self iconRectForRow: row]); + TorrentCell * cell = [[self tableColumnWithIdentifier: @"Torrent"] dataCell]; + return NSPointInRect(point, [cell iconRectForBounds: [self frameOfCellAtColumn: 0 row: row]]); } - (BOOL) pointInMinimalStatusRect: (NSPoint) point