X-Git-Url: https://git.r.bdr.sh/rbdr/captura/blobdiff_plain/a4e804275517af683afa1733e2db7c383c306f2b..505c1e620497828ffb914e05dd76d9ab124f144a:/Captura/Presentation/Windows/PreferencesWindow.swift diff --git a/Captura/Presentation/Windows/PreferencesWindow.swift b/Captura/Presentation/Windows/PreferencesWindow.swift index 40eac0d..233d21b 100644 --- a/Captura/Presentation/Windows/PreferencesWindow.swift +++ b/Captura/Presentation/Windows/PreferencesWindow.swift @@ -1,20 +1,36 @@ -import Cocoa -import SwiftUI +/* + Copyright (C) 2024 Rubén Beltrán del Río + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see https://captura.tranquil.systems. + */ +import Cocoa import Foundation +import SwiftUI 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) - super.center() + self.center() self.isReleasedWhenClosed = false - super.setFrameAutosaveName("Preferences Window") - super.contentView = NSHostingView(rootView: PreferencesScreen()) - super.makeKeyAndOrderFront(nil) + self.setFrameAutosaveName("Preferences Window") + self.contentView = NSHostingView(rootView: PreferencesScreen()) + self.makeKeyAndOrderFront(nil) + self.orderFrontRegardless() } }