Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a9b5e44

Browse files
committed
Show file path in reveal button tooltip
1 parent 59c2011 commit a9b5e44

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

imageoptim/FilesQueue.m

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#import "FilesQueue.h"
88

99
#import "Workers/DirWorker.h"
10+
#import "RevealButtonCell.h"
1011

1112
@interface FilesQueue ()
1213

@@ -182,6 +183,16 @@ - (NSString *)tableView:(NSTableView *)aTableView toolTipForCell:(NSCell *)aCell
182183
if (row < (signed)[objs count])
183184
{
184185
File *f = [objs objectAtIndex:row];
186+
187+
if ([aCell isKindOfClass:[RevealButtonCell class]]) {
188+
NSRect infoButtonRect = [((RevealButtonCell*)aCell) infoButtonRectForBounds:*rect];
189+
190+
BOOL mouseIsInside = NSMouseInRect(mouseLocation, infoButtonRect, [aTableView isFlipped]);
191+
if (mouseIsInside) {
192+
return [f filePath];
193+
}
194+
}
195+
185196
return [f statusText];
186197
}
187198
return nil;

0 commit comments

Comments
 (0)