← All repositories

crossmate

A collaborative crossword app for iPhone and iPad

git clone https://code.inqk.net/crossmate.git


commit dc7d434668f1bfc308fedb4da9eb1e03d2476bf6
parent 6e662a5c0923b389fabf99139cc4846c42345e06
Author: Michael Camilleri <[email protected]>
Date:   Tue, 26 May 2026 06:48:01 +0900

Tweak colours of announcement icons

Diffstat

MCrossmate/Views/AnnouncementBanner.swift | 15+++++++++------

1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/Crossmate/Views/AnnouncementBanner.swift b/Crossmate/Views/AnnouncementBanner.swift

@@ -62,13 +62,16 @@ struct AnnouncementBanner: View {
         }
     }
 
-    /// Foreground colour for the severity icon — kept solid (not the faint
-    /// background opacity) so the icon stands out against `backgroundTint`.
+    /// Foreground colour for the severity icon. Mixed toward `.primary` so the
+    /// icon reads as the "ink" version of `backgroundTint` — darker than the
+    /// background hue in light mode, lighter in dark mode — giving real tonal
+    /// contrast instead of saturated-on-tinted same-hue mush.
     private func iconTint(for severity: Announcement.Severity) -> Color {
-        switch severity {
-        case .info: return .blue
-        case .warning: return .orange
-        case .error: return .red
+        let base: Color = switch severity {
+        case .info: .blue
+        case .warning: .orange
+        case .error: .red
         }
+        return base.mix(with: .primary, by: 0.4)
     }
 }