You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

36 lines
1.1 KiB

// Copyright © 2015 Abhishek Banthia
import Cocoa
class OnboardingController: NSWindowController {
override func windowDidLoad() {
super.windowDidLoad()
window?.setAccessibilityIdentifier("OnboardingWindow")
window?.titlebarAppearsTransparent = true
window?.backgroundColor = Themer.shared().mainBackgroundColor()
window?.delegate = self
window?.standardWindowButton(.miniaturizeButton)?.isHidden = true
window?.standardWindowButton(.zoomButton)?.isHidden = true
window?.standardWindowButton(.closeButton)?.isHidden = true
}
override func showWindow(_ sender: Any?) {
super.showWindow(sender)
window?.center()
}
func launch() {
showWindow(nil)
NSApp.activate(ignoringOtherApps: true)
}
}
extension OnboardingController: NSWindowDelegate {
func windowWillClose(_: Notification) {
if let contentViewController = window?.contentViewController as? OnboardingParentViewController {
contentViewController.logExitPoint()
}
}
}