← All repositories

crossmate

A collaborative crossword app for iPhone and iPad

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


commit 91dddf14ebf533fde673e2669176daa6788a0afd
parent 984269e2e365158c7856f2e8a25ab3795103666d
Author: Michael Camilleri <[email protected]>
Date:   Thu, 18 Jun 2026 11:21:04 +0900

Revert use of gradient in strip

Diffstat

MCrossmate/Models/PlayerColor.swift | 18------------------
MCrossmate/Views/GameList/GameCardView.swift | 2+-

2 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/Crossmate/Models/PlayerColor.swift b/Crossmate/Models/PlayerColor.swift

@@ -27,24 +27,6 @@ struct PlayerColor: Sendable, Identifiable, Hashable {
     /// Fill for UI tied to this player's active selection (the selected cell).
     var selectionFill: Color { tint.opacity(selectedOpacity) }
 
-    /// Vertical gradient for the Game List participant strip: the player's
-    /// colour eased from a darker top to a lighter bottom for a slight sheen.
-    /// Varying luminance (rather than opacity) keeps the hue intact while
-    /// staying visible across the strip's 6pt height. `Color.mix` needs
-    /// iOS 18; older systems fall back to the flat selection fill.
-    var selectionStripGradient: LinearGradient {
-        let stops: [Color]
-        if #available(iOS 18.0, *) {
-            stops = [
-                tint.mix(with: .black, by: 0.16).opacity(selectedOpacity),
-                tint.mix(with: .white, by: 0.22).opacity(selectedOpacity)
-            ]
-        } else {
-            stops = [selectionFill, selectionFill]
-        }
-        return LinearGradient(colors: stops, startPoint: .top, endPoint: .bottom)
-    }
-
     /// Fill for UI tied to this player's passive highlight — the rest of the
     /// active word.
     var highlightFill: Color { tint.opacity(highlightedOpacity) }

diff --git a/Crossmate/Views/GameList/GameCardView.swift b/Crossmate/Views/GameList/GameCardView.swift

@@ -226,7 +226,7 @@ private struct ParticipantColorStrip: View {
                             .frame(width: 1 / displayScale)
                     }
                     Rectangle()
-                        .fill(participant.color.selectionStripGradient)
+                        .fill(participant.color.selectionFill)
                 }
             }
         }