aboutsummaryrefslogtreecommitdiff
path: root/Hotline
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2024-01-03 15:49:25 -0800
committerDustin Mierau <dustin@mierau.me>2024-01-03 15:49:25 -0800
commit69ddf90fda6d88fe440d6f6597db8c08962cd24e (patch)
tree498a91a294e96a79674adbb1cae77f06e1621e36 /Hotline
parent17290707648f0624e148d752338fe7d1610e455a (diff)
Dim Hotline logo in Servers window title bar when window is inactive.
Diffstat (limited to 'Hotline')
-rw-r--r--Hotline/Application.swift12
-rw-r--r--Hotline/macOS/TrackerView.swift10
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 {