]> git.r.bdr.sh - rbdr/captura/blob - Captura/Presentation/Windows/PreferencesWindow.swift
Add license and contributing
[rbdr/captura] / Captura / Presentation / Windows / PreferencesWindow.swift
1 /*
2 Copyright (C) 2024 Rubén Beltrán del Río
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see https://captura.tranquil.systems.
16 */
17 import Cocoa
18 import SwiftUI
19
20 import Foundation
21
22 class PreferencesWindow: NSWindow {
23
24 init() {
25 super.init(
26 contentRect: NSRect(x: 0, y: 0, width: 600, height: 600),
27 styleMask: [.titled, .closable, .resizable, .fullSizeContentView],
28 backing: .buffered,
29 defer: false)
30 self.center()
31 self.isReleasedWhenClosed = false
32 self.setFrameAutosaveName("Preferences Window")
33 self.contentView = NSHostingView(rootView: PreferencesScreen())
34 self.makeKeyAndOrderFront(nil)
35 self.orderFrontRegardless()
36 }
37 }