diff options
| author | Dustin Mierau <dustin@mierau.me> | 2023-12-22 23:53:58 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2023-12-22 23:53:58 -0800 |
| commit | 674477d8c76d9625d0c3967c8fae54a5abdb86a4 (patch) | |
| tree | f166c4a53b58ae52ae478ca6032fedb49123209d /Hotline | |
| parent | 9db5a502ccabf1d19d40b1120aa960320f341e28 (diff) | |
Dim user list propertly in inactive window.
Diffstat (limited to 'Hotline')
| -rw-r--r-- | Hotline/macOS/ServerView.swift | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Hotline/macOS/ServerView.swift b/Hotline/macOS/ServerView.swift index 7ad344e..ce9b3dc 100644 --- a/Hotline/macOS/ServerView.swift +++ b/Hotline/macOS/ServerView.swift @@ -113,6 +113,7 @@ private func connectionStatusToProgress(status: HotlineClientStatus) -> Double { struct ServerView: View { @Environment(Hotline.self) private var model: Hotline @Environment(\.dismiss) var dismiss + @Environment(\.controlActiveState) private var controlActiveState @State private var agreementShown: Bool = false @State private var selection: MenuItem? = ServerView.menuItems.first @@ -162,22 +163,26 @@ struct ServerView: View { HStack { Text("🙂") .font(.headline) + .opacity(controlActiveState == .inactive ? 0.5 : 1.0) if user.status.contains(.admin) { if user.status.contains(.idle) { Text(user.name) - .foregroundStyle(.red.opacity(0.5)) + .foregroundStyle(.red) + .opacity(controlActiveState == .inactive ? 0.3 : 0.5) } else { Text(user.name) .foregroundStyle(.red) + .opacity(controlActiveState == .inactive ? 0.5 : 1.0) } } else if user.status.contains(.idle) { Text(user.name) - .opacity(0.5) + .opacity(controlActiveState == .inactive ? 0.3 : 0.5) } else { Text(user.name) +// .opacity(controlActiveState == .inactive ? 0.5 : 1.0) } Spacer() } |