diff --git a/Mac/AppDelegate.swift b/Mac/AppDelegate.swift index 56237126b..855f85adf 100644 --- a/Mac/AppDelegate.swift +++ b/Mac/AppDelegate.swift @@ -350,7 +350,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, // MARK: Main Window func createMainWindowController() -> MainWindowController { - let controller = windowControllerWithName("MainWindow") as! MainWindowController + let controller: MainWindowController + if #available(macOS 10.16, *) { + let storyboard = NSStoryboard(name: NSStoryboard.Name("MainWindow"), bundle: nil) + controller = storyboard.instantiateController(withIdentifier: "UnifiedWindowController") as! MainWindowController + } else { + controller = windowControllerWithName("MainWindow") as! MainWindowController + } + if !(mainWindowController?.isOpen ?? false) { mainWindowControllers.removeAll() } diff --git a/Mac/Base.lproj/MainWindow.storyboard b/Mac/Base.lproj/MainWindow.storyboard index 72d27d2ce..452b29bb0 100644 --- a/Mac/Base.lproj/MainWindow.storyboard +++ b/Mac/Base.lproj/MainWindow.storyboard @@ -3,6 +3,7 @@ + @@ -255,6 +256,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -287,14 +328,14 @@ - + - + - + - + - + - + - - - + + + - + + + @@ -616,6 +661,9 @@ + + +