quicklook window expands from the icon instead of the whole table row

This commit is contained in:
Mitchell Livingston 2008-05-21 22:09:05 +00:00
parent 0c94c7b623
commit e6f66b1d07
7 changed files with 19 additions and 3 deletions

View File

@ -341,7 +341,7 @@
isa = PBXContainerItemProxy;
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
proxyType = 1;
remoteGlobalIDString = A2DF58240DE4B0EF000795D5 /* shttpd */;
remoteGlobalIDString = A2DF58240DE4B0EF000795D5;
remoteInfo = shttpd;
};
BE1183750CE161040002D0F3 /* PBXContainerItemProxy */ = {

View File

@ -4089,7 +4089,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
id item = [fTableView itemAtRow: row];
if ([item isKindOfClass: [Torrent class]] && [[(Torrent *)item dataLocation] isEqualToString: fullPath])
{
NSRect frame = [fTableView rectOfRow: row];
NSRect frame = [fTableView iconRectForRow: row];
frame.origin = [fTableView convertPoint: frame.origin toView: nil];
frame.origin = [fWindow convertBaseToScreen: frame.origin];
frame.origin.y -= frame.size.height;

View File

@ -39,6 +39,8 @@
- (void) setTorrent: (Torrent *) torrent;
- (Torrent *) torrent;
- (NSRect) iconRectForRow: (int) row;
- (int) hoveredRow;
@end

View File

@ -113,6 +113,12 @@
return [self menu];
}
- (NSRect) iconRectForRow: (int) row
{
FileNameCell * cell = (FileNameCell *)[[self tableColumnWithIdentifier: @"Name"] dataCell];
return [cell imageRectForBounds: [self rectOfRow: row]];
}
- (void) updateTrackingAreas
{
[super updateTrackingAreas];

View File

@ -24,6 +24,7 @@
#import "InfoWindowController.h"
#import "InfoTabButtonCell.h"
#import "FileOutlineView.h"
#import "QuickLookController.h"
#import "NSApplicationAdditions.h"
#import "NSStringAdditions.h"
@ -945,7 +946,7 @@ typedef enum
id rowItem = [fileOutlineView itemAtRow: row];
if ([[folder stringByAppendingPathComponent: [rowItem objectForKey: @"Path"]] isEqualToString: fullPath])
{
NSRect frame = [fileOutlineView rectOfRow: row];
NSRect frame = [fileOutlineView iconRectForRow: row];
frame.origin = [fileOutlineView convertPoint: frame.origin toView: nil];
frame.origin = [[self window] convertBaseToScreen: frame.origin];
frame.origin.y -= frame.size.height;

View File

@ -66,6 +66,8 @@
- (NSArray *) selectedValues;
- (NSArray *) selectedTorrents;
- (NSRect) iconRectForRow: (int) row;
- (void) paste: (id) sender;
- (void) toggleControlForTorrent: (Torrent *) torrent;

View File

@ -545,6 +545,11 @@
}
}
- (NSRect) iconRectForRow: (int) row
{
return [fTorrentCell iconRectForBounds: [self rectOfRow: row]];
}
- (void) paste: (id) sender
{
NSURL * url;