import Cocoa import SwiftUI import Foundation class PreferencesWindow: NSWindow { init() { super.init( contentRect: NSRect(x: 0, y: 0, width: 600, height: 600), styleMask: [.titled, .closable, .resizable, .fullSizeContentView], backing: .buffered, defer: false) self.center() self.isReleasedWhenClosed = false self.setFrameAutosaveName("Preferences Window") self.contentView = NSHostingView(rootView: PreferencesScreen()) self.makeKeyAndOrderFront(nil) self.orderFrontRegardless() } }