| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // AppDelegate.swift
- // App for Indeed
- //
- // Created by Mql Mac 2 on 11/05/2026.
- //
- import Cocoa
- @main
- class AppDelegate: NSObject, NSApplicationDelegate {
- private let minimumWindowSize = NSSize(width: 1024, height: 700)
- func applicationWillFinishLaunching(_ notification: Notification) {
- // Dashboard is light-themed; without this, a Dark Mode Mac paints a dark title bar.
- NSApp.appearance = NSAppearance(named: .aqua)
- }
- func applicationDidFinishLaunching(_ aNotification: Notification) {
- 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.title = "App for Indeed"
- window.styleMask.insert(.fullSizeContentView)
- window.titlebarAppearsTransparent = true
- window.titleVisibility = .hidden
- window.isMovableByWindowBackground = true
- window.center()
- window.makeKeyAndOrderFront(nil)
- }
- }
- func applicationWillTerminate(_ aNotification: Notification) {
- // Insert code here to tear down your application
- }
- func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
- return true
- }
- }
|