mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
• `xcconfig` `MACOSX_DEPLOYMENT_TARGET` updated to 13.0 • Removed `@available` annotations for macOS < 13.0 • Removed for Big Sur fixes. This has been built and doesn’t trigger any build settings should be `xcconfig` options.
59 lines
1.3 KiB
Swift
59 lines
1.3 KiB
Swift
//
|
|
// AboutWindowController.swift
|
|
// NetNewsWire
|
|
//
|
|
// Created by Stuart Breckenridge on 03/10/2022.
|
|
// Copyright © 2022 Ranchero Software. All rights reserved.
|
|
//
|
|
|
|
import AppKit
|
|
import SwiftUI
|
|
import RSCore
|
|
|
|
extension NSUserInterfaceItemIdentifier {
|
|
static let aboutNetNewsWire = NSUserInterfaceItemIdentifier("about.netnewswire")
|
|
}
|
|
|
|
// MARK: - AboutWindowController
|
|
|
|
class AboutWindowController: NSWindowController {
|
|
|
|
var hostingController: AboutHostingController
|
|
|
|
override init(window: NSWindow?) {
|
|
self.hostingController = AboutHostingController(rootView: AnyView(AboutNewNewsWireView()))
|
|
super.init(window: window)
|
|
let window = NSWindow(contentViewController: hostingController)
|
|
window.identifier = .aboutNetNewsWire
|
|
window.standardWindowButton(.zoomButton)?.isEnabled = false
|
|
window.standardWindowButton(.miniaturizeButton)?.isEnabled = false
|
|
window.titleVisibility = .hidden
|
|
self.window = window
|
|
}
|
|
|
|
required init?(coder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
|
|
override func windowDidLoad() {
|
|
super.windowDidLoad()
|
|
}
|
|
|
|
}
|
|
|
|
// MARK: - AboutHostingController
|
|
|
|
class AboutHostingController: NSHostingController<AnyView> {
|
|
|
|
override init(rootView: AnyView) {
|
|
super.init(rootView: rootView)
|
|
}
|
|
|
|
@MainActor required dynamic init?(coder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
}
|
|
|
|
|
|
|