Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private fun SuccessContent(
) {
LobbyHeader(
user = data.user,
onOpenNotifications = { /* notifications sheet deferred */ },
onOpenNotifications = {},
)
Divider()
BalanceHero(
Expand Down Expand Up @@ -537,6 +537,9 @@ private fun GameCard(
fontWeight = FontWeight.SemiBold,
)
Spacer(modifier = Modifier.height(8.dp))
// alignByBaseline keeps the two labels typographically level
// even though the right side uses `tnum` digits that report
// slightly different line metrics than the plain-letter left.
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
Expand All @@ -546,13 +549,15 @@ private fun GameCard(
color = TextLow,
fontSize = SmallMetaFontSize,
letterSpacing = TrackedLetterSpacing,
modifier = Modifier.alignByBaseline(),
)
Text(
text = card.infoRight.uppercase(),
color = TextLow,
fontSize = SmallMetaFontSize,
letterSpacing = TrackedLetterSpacing,
style = TextStyle(fontFeatureSettings = "tnum"),
modifier = Modifier.alignByBaseline(),
)
}
}
Expand Down Expand Up @@ -629,11 +634,16 @@ private fun CoinflipCard(
letterSpacing = TrackedLetterSpacing,
)
}
// Aligns with the subtitle line of the left column instead of
// the row centre so the meta label sits on the same baseline
// as X2 PAYOUT (mockup line 173 leaves both labels at the
// foot of the card).
Text(
text = card.infoRight.uppercase(),
color = TextLow,
fontSize = MetaFontSize,
letterSpacing = TrackedLetterSpacing,
modifier = Modifier.align(Alignment.Bottom),
)
}
}
Expand Down Expand Up @@ -1027,10 +1037,7 @@ private fun GameKey.iconRes(): Int =
GameKey.Blackjack -> R.drawable.ic_game_blackjack
GameKey.Crash -> R.drawable.ic_game_crash
GameKey.Mines -> R.drawable.ic_game_mines
// Coinflip uses the inline "x2" badge in CoinflipCard instead of a
// drawable; this is dead for the grid path but kept to make the
// when-exhaustive contract honest.
GameKey.Coinflip -> R.drawable.ic_game_crash
GameKey.Coinflip -> R.drawable.ic_game_coinflip
}

private fun initialsOf(name: String): String {
Expand Down
17 changes: 17 additions & 0 deletions app/src/main/res/drawable/ic_game_coinflip.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!--
Two overlapping circles representing the heads / tails pair. Tinted by
the Icon composable at render time.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#00000000"
android:strokeColor="#FFFFFF"
android:strokeWidth="2"
android:strokeLineJoin="round"
android:strokeLineCap="round"
android:pathData="M2,12 a4,4 0 1,0 8,0 a4,4 0 1,0 -8,0 z M14,12 a4,4 0 1,0 8,0 a4,4 0 1,0 -8,0 z" />
</vector>
Loading