Modern Apps git

← Modern-Apps.git

library: show "Completed" in the primary colour, not error red (#ux-audit)

Commit
5cb9118f49a6e55c5db0b238659a97a9fe482b95
Author
Vayun Mathur <[email protected]>
When
2026-11-13 01:22 UTC (23 days ago)
Parents
43e5890
Symptom: in the level picker shared by pipes and unblockjam, a level
the player had already finished was labelled "Completed" in the theme's
error colour. Red bold text under the level number read as a warning or
a failure - the opposite of what it meant.

Root cause: LevelPickerBox styled the completed label with
MaterialTheme.colorScheme.error.

Fix: the label now uses colorScheme.primary, the accent colour the
other shared game chrome uses for success (the result card's won
title, the unlock toast). Size and weight are unchanged.

User-visible effect: finished levels show "Completed" in the accent colour
(per the dynamic theme) instead of in red.

Verification: visual-only change of one colour token; the existing
Slice2GameComposeTest level-picker test still finds and displays the
label. Store screenshots will pick it up on the planned regeneration.

Diff

library/ui/src/main/java/com/vayunmathur/library/ui/game/GameInfoBoxes.kt
diff --git a/library/ui/src/main/java/com/vayunmathur/library/ui/game/GameInfoBoxes.kt b/library/ui/src/main/java/com/vayunmathur/library/ui/game/GameInfoBoxes.ktindex cf75b88c22..48df5a9deb 100644--- a/library/ui/src/main/java/com/vayunmathur/library/ui/game/GameInfoBoxes.kt+++ b/library/ui/src/main/java/com/vayunmathur/library/ui/game/GameInfoBoxes.kt@@ -24,6 +24,8 @@ import com.vayunmathur.library.ui.Text  * one higher. Arrows disable at the ends rather than wrapping, so the player can tell where the pack  * stops.  *+ * A finished level is marked "Completed" in the primary colour.+ *  * [title] is a parameter because the games do not agree on the noun — unblockjam calls them puzzles — and  * sharing the mechanism should not flatten their wording.  */@@ -55,7 +57,8 @@ fun LevelPickerBox(         if (isCompleted) {             Text(                 text = stringResource(R.string.game_completed),-                color = MaterialTheme.colorScheme.error,+                // An accomplishment, so the accent colour - never error red, which reads as a failure.+                color = MaterialTheme.colorScheme.primary,                 fontSize = 12.sp,                 fontWeight = FontWeight.Bold,             )