mirror of
https://github.com/transmission/transmission
synced 2025-02-20 21:26:53 +00:00
macOS fix quicklook in the Torrent Inspector files view (#3321)
This commit is contained in:
parent
7030eb8530
commit
b983a3ba5c
1 changed files with 26 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue