From 75b40db9adac93dde9df3ff76bb172c76e3d3a55 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Wed, 8 May 2024 20:53:10 -0700 Subject: Fix about box layout on open. Remove about box from window menu, add expand button to server agreement, add email address highlighting, style server messages, unread badge on admins are red now, play server message sound, some code cleanup. --- Hotline/Application-macOS.swift | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Hotline/Application-macOS.swift') diff --git a/Hotline/Application-macOS.swift b/Hotline/Application-macOS.swift index ccc4b15..09d6d91 100644 --- a/Hotline/Application-macOS.swift +++ b/Hotline/Application-macOS.swift @@ -49,9 +49,9 @@ struct Application: App { .frame(minWidth: 250, minHeight: 250) .environment(bookmarks) } - .keyboardShortcut(.init(.init("R"), modifiers: .command)) .defaultSize(width: 700, height: 550) .defaultPosition(.center) + .keyboardShortcut(.init("R"), modifiers: .command) .onChange(of: AppLaunchState.shared.launchState) { if AppLaunchState.shared.launchState == .launched { if Prefs.shared.showBannerToolbar { @@ -60,21 +60,20 @@ struct Application: App { } } + // MARK: About Box Window("About", id: "about") { AboutView() .ignoresSafeArea() .background(Color.hotlineRed) } .windowResizability(.contentSize) -// .windowStyle(.hiddenTitleBar) - .windowStyle(HiddenTitleBarWindowStyle()) + .windowStyle(.hiddenTitleBar) .defaultPosition(.center) + .commandsRemoved() // Remove About that was automatically added to Window menu. .commands { CommandGroup(replacing: CommandGroupPlacement.appInfo) { - Button(action: { + Button("About Hotline") { openWindow(id: "about") - }) { - Text("About Hotline") } } } -- cgit