From fc798a575aed94718dcc4c5555b6e01cf8da93e9 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Fri, 3 May 2024 14:46:42 -0700 Subject: Nicer about box. --- Hotline/Application-macOS.swift | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Hotline/Application-macOS.swift') diff --git a/Hotline/Application-macOS.swift b/Hotline/Application-macOS.swift index ec42a89..eb5be32 100644 --- a/Hotline/Application-macOS.swift +++ b/Hotline/Application-macOS.swift @@ -60,6 +60,25 @@ struct Application: App { } } + Window("About", id: "about") { + AboutView() + .ignoresSafeArea() + .background(Color.hotlineRed) + } + .windowResizability(.contentSize) + .windowStyle(.hiddenTitleBar) + .defaultSize(width: 300, height: 400) + .defaultPosition(.center) + .commands { + CommandGroup(replacing: CommandGroupPlacement.appInfo) { + Button(action: { + openWindow(id: "about") + }) { + Text("About Hotline") + } + } + } + // MARK: Server Window WindowGroup(id: "server", for: Server.self) { server in ServerView(server: server) @@ -165,6 +184,7 @@ struct Application: App { SettingsView() } + // MARK: News Editor Window // WindowGroup(id: "news-editor", for: NewsArticle.self) { $article in // NewsEditorView(article: $article) -- cgit