| 1234567891011121314151617181920212223242526272829303132333435 |
- //
- // AppDelegate.swift
- // smart_printer
- //
- import Cocoa
- @main
- class AppDelegate: NSObject, NSApplicationDelegate {
- func applicationDidFinishLaunching(_ notification: Notification) {
- DispatchQueue.main.async {
- self.configureMainWindow()
- }
- }
- private func configureMainWindow() {
- guard let window = NSApplication.shared.windows.first else { return }
- window.title = "Smart Printer"
- window.titlebarAppearsTransparent = true
- window.titleVisibility = .hidden
- window.styleMask.insert(.fullSizeContentView)
- window.isMovableByWindowBackground = true
- window.backgroundColor = AppTheme.background
- window.setContentSize(NSSize(width: 1120, height: 720))
- window.center()
- window.minSize = NSSize(width: 900, height: 600)
- }
- func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
- true
- }
- }
|