diff options
| author | Dustin Mierau <dustin@mierau.me> | 2025-11-07 12:44:55 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2025-11-07 12:44:55 -0800 |
| commit | a55318fa8d643160900bec3e6b14e7404c63497a (patch) | |
| tree | ab6a9eca9a368b35e1490becc70f94ebde6ac271 /Hotline/Library/QuickLookPreviewView.swift | |
| parent | 786a387d58fc66ae20716a9dee46b74dff8e6894 (diff) | |
Organize Library folder a bit. Update Tracker add/edit sheet design.
Diffstat (limited to 'Hotline/Library/QuickLookPreviewView.swift')
| -rw-r--r-- | Hotline/Library/QuickLookPreviewView.swift | 22 |
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 - } -} |