aboutsummaryrefslogtreecommitdiff
path: root/Hotline/Library/QuickLookPreviewView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Hotline/Library/QuickLookPreviewView.swift')
-rw-r--r--Hotline/Library/QuickLookPreviewView.swift22
1 files changed, 0 insertions, 22 deletions
diff --git a/Hotline/Library/QuickLookPreviewView.swift b/Hotline/Library/QuickLookPreviewView.swift
deleted file mode 100644
index 6ba154e..0000000
--- a/Hotline/Library/QuickLookPreviewView.swift
+++ /dev/null
@@ -1,22 +0,0 @@
-import SwiftUI
-import Quartz
-
-/// Embeddable QuickLook preview view for macOS
-///
-/// This view uses QLPreviewView to display file previews inline, without showing a modal.
-/// Supports all file types that QuickLook supports (images, PDFs, videos, documents, etc.)
-struct QuickLookPreviewView: NSViewRepresentable {
- let fileURL: URL
-
- func makeNSView(context: Context) -> QLPreviewView {
- let preview = QLPreviewView(frame: .zero, style: .normal)!
- preview.autostarts = true
- preview.shouldCloseWithWindow = true
- preview.previewItem = fileURL as QLPreviewItem
- return preview
- }
-
- func updateNSView(_ nsView: QLPreviewView, context: Context) {
- nsView.previewItem = fileURL as QLPreviewItem
- }
-}