macOS fix quicklook in the Torrent Inspector files view (#3321)
This commit is contained in:
parent
7030eb8530
commit
b983a3ba5c
|
@ -125,6 +125,32 @@
|
||||||
[self.fFileController uncheckAll];
|
[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
|
- (NSArray<NSURL*>*)quickLookURLs
|
||||||
{
|
{
|
||||||
FileOutlineView* fileOutlineView = self.fFileController.outlineView;
|
FileOutlineView* fileOutlineView = self.fFileController.outlineView;
|
||||||
|
|
Loading…
Reference in New Issue