aboutsummaryrefslogtreecommitdiff
path: root/Captura/Presentation/Windows/PreferencesWindow.swift
blob: 6022be59201fb14f45917677763d8f49805ef2c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Cocoa
import SwiftUI

import Foundation

class PreferencesWindow: NSWindow {
  
  init() {
    super.init(
      contentRect: NSRect(x: 0, y: 0, width: 600, height: 600),
      styleMask: [.titled, .closable, .resizable, .fullSizeContentView],
      backing: .buffered,
      defer: false)
    self.center()
    self.isReleasedWhenClosed = false
    self.setFrameAutosaveName("Preferences Window")
    self.contentView = NSHostingView(rootView: PreferencesScreen())
    self.makeKeyAndOrderFront(nil)
    self.orderFrontRegardless()
  }
}