45 lines
1.1 KiB
Swift
45 lines
1.1 KiB
Swift
//
|
|
// QueueCubeApp.swift
|
|
// QueueCube
|
|
//
|
|
// Created by James Magahern on 3/3/25.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
@main
|
|
struct QueueCubeApp: App {
|
|
@Environment(\.openWindow) private var openWindow
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
ContentView()
|
|
.onAppear {
|
|
#if targetEnvironment(macCatalyst)
|
|
guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene else { return }
|
|
windowScene.titlebar?.titleVisibility = .hidden
|
|
windowScene.titlebar?.separatorStyle = .none
|
|
#endif
|
|
}
|
|
}.commands {
|
|
CommandGroup(replacing: .appSettings) {
|
|
Button(.settings_) {
|
|
openWindow(id: .settingsWindowID)
|
|
}
|
|
.keyboardShortcut(",", modifiers: .command)
|
|
}
|
|
}
|
|
.defaultSize(width: 640.0, height: 800.0)
|
|
|
|
WindowGroup(id: .settingsWindowID) {
|
|
SettingsView(onDone: {})
|
|
}
|
|
.defaultSize(width: 480.0, height: 400.0)
|
|
}
|
|
}
|
|
|
|
fileprivate extension String
|
|
{
|
|
static let settingsWindowID = "settings"
|
|
}
|