Açıklama Yok

AppDelegate.swift 944B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // AppDelegate.swift
  3. // smart_printer
  4. //
  5. import Cocoa
  6. @main
  7. class AppDelegate: NSObject, NSApplicationDelegate {
  8. func applicationDidFinishLaunching(_ notification: Notification) {
  9. DispatchQueue.main.async {
  10. self.configureMainWindow()
  11. }
  12. }
  13. private func configureMainWindow() {
  14. guard let window = NSApplication.shared.windows.first else { return }
  15. window.title = "Smart Printer"
  16. window.titlebarAppearsTransparent = true
  17. window.titleVisibility = .hidden
  18. window.styleMask.insert(.fullSizeContentView)
  19. window.isMovableByWindowBackground = true
  20. window.backgroundColor = AppTheme.background
  21. window.setContentSize(NSSize(width: 1120, height: 720))
  22. window.center()
  23. window.minSize = NSSize(width: 900, height: 600)
  24. }
  25. func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
  26. true
  27. }
  28. }