// // Created by Matt Baer on 8/2/17. // Copyright (c) 2017 A Bunch Tell. All rights reserved. // import Foundation import AppKit class WindowController: NSWindowController { var vc: ViewController? required init?(coder: NSCoder) { super.init(coder: coder) shouldCascadeWindows = true } override func windowDidLoad() { super.windowDidLoad() vc = (self.window?.contentViewController)! as! ViewController let delegate = NSApplication.shared().delegate as! AppDelegate // Set night mode state vc?.toggle(isNight: delegate.globalSettings.isNight) } func toggle(isNight: Bool) { vc?.toggle(isNight: isNight) } func embolden() { vc?.embolden() } func emphasize() { vc?.emphasize() } }