mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
macOS fix quicklook in the Torrent Inspector files view (#3321)
This commit is contained in:
@@ -125,6 +125,32 @@
|
||||
[self.fFileController uncheckAll];
|
||||
}
|
||||
|
||||
- (void)keyDown:(NSEvent*)event
|
||||
{
|
||||
unichar const firstChar = [event.charactersIgnoringModifiers characterAtIndex:0];
|
||||
|
||||
if (firstChar == ' ')
|
||||
{
|
||||
[self toggleQuickLook:nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
[super keyDown:event];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)toggleQuickLook:(id)sender
|
||||
{
|
||||
if ([QLPreviewPanel sharedPreviewPanel].visible)
|
||||
{
|
||||
[[QLPreviewPanel sharedPreviewPanel] orderOut:nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
[[QLPreviewPanel sharedPreviewPanel] makeKeyAndOrderFront:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSArray<NSURL*>*)quickLookURLs
|
||||
{
|
||||
FileOutlineView* fileOutlineView = self.fFileController.outlineView;
|
||||
|
||||
Reference in New Issue
Block a user