Files
VisionPOC/Sources/App/AboutWindowController.swift
james.maesandClaude Opus 4.7 ccb2bb7119 Add About dialog with full credits
⌘-click VisionPOC → "About VisionPOC" (or click the About menu item at
the top of the app menu) opens a dedicated About window styled to match
the HUD: cyan / mint / amber / magenta section headers, monospaced
typography, dark-aqua chrome.

Sections:
- WHAT IT IS — role in the Jarvis program, sibling to MetalPOC + VoicePOC
- DETECTION — Ultralytics YOLOv8x-OIV7 (601 classes), Apple Vision
  framework (text + faces + body/hand pose + animals + tracking + image
  feature print), Core ML + ANE
- RENDERING — Metal 4 + MetalKit, MPSImageSobel, AVFoundation +
  CVMetalTextureCache
- TYPOGRAPHY — Share Tech Mono (Carrois Apostrophe), Orbitron (Matt
  McInerney), both under SIL OFL
- INSPIRATION — Jarvis / Iron Man cinematic HUD
- LICENSE — MIT 2026 James Maes, clickable GitHub link
- BUILT WITH — Claude Opus + Claude Code, XcodeGen, git-lfs

Version string is pulled live from the Info.plist
(CFBundleShortVersionString + CFBundleVersion) so it always reflects
what was built. Window position persists under VPOC.AboutWindowFrame.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 18:12:16 -05:00

43 lines
1.4 KiB
Swift

import AppKit
import SwiftUI
@MainActor
final class AboutWindowController: NSWindowController, NSWindowDelegate {
nonisolated(unsafe) private static let frameDefaultsKey = "VPOC.AboutWindowFrame"
init() {
let hosting = NSHostingController(rootView: AboutView())
let window = NSWindow(contentViewController: hosting)
window.title = "About VisionPOC"
window.styleMask = [.titled, .closable, .resizable]
window.appearance = NSAppearance(named: .darkAqua)
window.isReleasedWhenClosed = false
window.center()
super.init(window: window)
window.delegate = self
restoreFrame()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) is not supported")
}
private func restoreFrame() {
guard let window,
let saved = UserDefaults.standard.string(forKey: AboutWindowController.frameDefaultsKey) else {
return
}
let rect = NSRectFromString(saved)
if rect.size.width > 0 && rect.size.height > 0 {
window.setFrame(rect, display: false)
}
}
nonisolated func windowWillClose(_ notification: Notification) {
guard let window = notification.object as? NSWindow else { return }
UserDefaults.standard.set(NSStringFromRect(window.frame),
forKey: AboutWindowController.frameDefaultsKey)
}
}