diff options
| -rw-r--r-- | Hotline/Application.swift | 12 | ||||
| -rw-r--r-- | Hotline/macOS/TrackerView.swift | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/Hotline/Application.swift b/Hotline/Application.swift index 0804615..9c966d0 100644 --- a/Hotline/Application.swift +++ b/Hotline/Application.swift @@ -19,18 +19,8 @@ struct Application: App { Window("Servers", id: "servers") { TrackerView() .frame(minWidth: 250, minHeight: 250) - .toolbar { - ToolbarItem(placement: .navigation) { - Image("Hotline") - .resizable() - .renderingMode(.template) - .scaledToFit() - .foregroundColor(Color(hex: 0xE10000)) - .frame(width: 9) - } - } } - .defaultSize(width: 700, height: 600) + .defaultSize(width: 700, height: 550) .defaultPosition(.center) WindowGroup(id: "server", for: Server.self) { $server in diff --git a/Hotline/macOS/TrackerView.swift b/Hotline/macOS/TrackerView.swift index 0278904..3aed49f 100644 --- a/Hotline/macOS/TrackerView.swift +++ b/Hotline/macOS/TrackerView.swift @@ -210,6 +210,7 @@ struct TrackerItemView: View { struct TrackerView: View { @Environment(\.colorScheme) private var colorScheme @Environment(\.openWindow) private var openWindow + @Environment(\.controlActiveState) private var controlActiveState var bookmarks: [TrackerBookmark] = [ TrackerBookmark(type: .server, name: "RetroMac", address: "82.32.130.173"), @@ -333,6 +334,15 @@ struct TrackerView: View { } .navigationTitle("Servers") .toolbar { + ToolbarItem(placement: .navigation) { + Image("Hotline") + .resizable() + .renderingMode(.template) + .scaledToFit() + .foregroundColor(Color(hex: 0xE10000)) + .frame(width: 9) + .opacity(controlActiveState == .inactive ? 0.5 : 1.0) + } ToolbarItem(placement: .primaryAction) { Button { Task { |