crossmate

A collaborative crossword app for iOS
Log | Files | Refs | LICENSE

commit f13370af31fff7a5e5978d206499e4930803fb0e
parent 7308d28801de6ccf66ff6f7b85766ed3be348aad
Author: Michael Camilleri <[email protected]>
Date:   Thu, 21 May 2026 14:24:34 +0900

Tweak Clue Bar background colour

Diffstat:
MCrossmate/Models/PlayerColor.swift | 5++++-
MCrossmate/Views/CellView.swift | 2+-
MCrossmate/Views/PuzzleView.swift | 4+++-
3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Crossmate/Models/PlayerColor.swift b/Crossmate/Models/PlayerColor.swift @@ -21,11 +21,14 @@ struct PlayerColor: Sendable, Identifiable, Hashable { /// Opacity used for the rest of this player's active word. var highlightedOpacity: Double { 0.40 } + /// Opacity used for faint author-attribution tinting. + static let authorTintOpacity = 0.10 + /// Fill for UI tied to this player's active selection (the selected cell). var selectionFill: Color { tint.opacity(selectedOpacity) } /// Fill for UI tied to this player's passive highlight — the rest of the - /// active word and the clue bar. Change this to retint both at once. + /// active word. var highlightFill: Color { tint.opacity(highlightedOpacity) } } diff --git a/Crossmate/Views/CellView.swift b/Crossmate/Views/CellView.swift @@ -118,7 +118,7 @@ struct CellView: View, Equatable { // in a shared game. Sits beneath transient highlights so peer // and local cursors still dominate. if let authorTint { - authorTint.opacity(0.10) + authorTint.opacity(PlayerColor.authorTintOpacity) } // Peer word tint sits beneath self highlight/selection so the // local cursor always reads as the dominant focus. diff --git a/Crossmate/Views/PuzzleView.swift b/Crossmate/Views/PuzzleView.swift @@ -1362,6 +1362,8 @@ private struct ClueBar: View { @State private var isShowingClueList = false private var playerColor: PlayerColor { preferences.color } + private var backgroundTint: Color { playerColor.tint } + private var backgroundOpacity: Double { PlayerColor.authorTintOpacity } var body: some View { let clue = session.currentClue() @@ -1387,7 +1389,7 @@ private struct ClueBar: View { session.toggleDirection() } ) - .background(playerColor.highlightFill) + .background(backgroundTint.opacity(backgroundOpacity)) .animation(.smooth(duration: 0.22), value: currentKey) .sheet(isPresented: $isShowingClueList) { ClueList(session: session)