|
|
@@ -10,11 +10,22 @@ import Cocoa
|
|
|
@main
|
|
|
class AppDelegate: NSObject, NSApplicationDelegate {
|
|
|
|
|
|
-
|
|
|
+ private let minimumWindowSize = NSSize(width: 1024, height: 700)
|
|
|
|
|
|
|
|
|
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
|
|
- // Insert code here to initialize your application
|
|
|
+ NSApp.activate(ignoringOtherApps: true)
|
|
|
+ DispatchQueue.main.async { [weak self] in
|
|
|
+ guard
|
|
|
+ let self,
|
|
|
+ let window = NSApp.windows.first
|
|
|
+ else { return }
|
|
|
+
|
|
|
+ window.minSize = self.minimumWindowSize
|
|
|
+ window.setContentSize(self.minimumWindowSize)
|
|
|
+ window.center()
|
|
|
+ window.makeKeyAndOrderFront(nil)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
func applicationWillTerminate(_ aNotification: Notification) {
|