diff options
| author | Dustin Mierau <dustin@mierau.me> | 2024-05-08 20:53:10 -0700 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2024-05-08 20:53:10 -0700 |
| commit | 75b40db9adac93dde9df3ff76bb172c76e3d3a55 (patch) | |
| tree | 1e9088849d7a32ac0f42c933e2b6ab50350ed196 /Hotline/Application-macOS.swift | |
| parent | 01d32910bc1e75533c2f473011296fee6febbadb (diff) | |
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.
Diffstat (limited to 'Hotline/Application-macOS.swift')
| -rw-r--r-- | Hotline/Application-macOS.swift | 11 |
1 files changed, 5 insertions, 6 deletions
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") } } } |