commit 8df7024aef31b2948138571a570e7b93fd88a661
parent 96c41c6a6ec95155afb6a4d684abb2f5ffaf649e
Author: Michael Camilleri <[email protected]>
Date: Fri, 22 May 2026 00:20:47 +0900
Use player colour for info announcements
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Crossmate/Views/AnnouncementBanner.swift b/Crossmate/Views/AnnouncementBanner.swift
@@ -5,6 +5,7 @@ import SwiftUI
/// intended to live in the puzzle header (and eventually the game list)
/// behind a `.transition(.move(edge: .top))` driven by the parent.
struct AnnouncementBanner: View {
+ @Environment(PlayerPreferences.self) private var preferences
let announcement: Announcement
let onDismiss: (() -> Void)?
@@ -37,7 +38,9 @@ struct AnnouncementBanner: View {
private func backgroundTint(for severity: Announcement.Severity) -> Color {
switch severity {
- case .info: return Color(.tertiarySystemFill)
+ // Match the Clue Bar's faint author-attribution tint so info-class
+ // banners read as part of the puzzle chrome rather than a system fill.
+ case .info: return preferences.color.authorTintFill
case .warning: return Color.orange.opacity(0.18)
case .error: return Color.red.opacity(0.18)
}