From 167ebdff27d814f419ba8e09818846f86de17306 Mon Sep 17 00:00:00 2001 From: flykhan Date: Sun, 26 Apr 2026 18:44:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=BA=E5=99=A8=E4=BA=BA=E4=B8=93?= =?UTF-8?q?=E5=B1=9E=E8=89=B2=E8=B0=83=EF=BC=8C=E5=90=8D=E5=AD=97=E5=92=8C?= =?UTF-8?q?=E8=BE=B9=E6=A1=86=E4=BD=BF=E7=94=A8=E5=90=84=E8=87=AA=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E4=BE=BF=E4=BA=8E=E5=AF=B9=E5=B1=80=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/unogame/ui/components/PlayerAvatar.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/unogame/ui/components/PlayerAvatar.kt b/app/src/main/java/com/unogame/ui/components/PlayerAvatar.kt index 44366ca..a73d784 100644 --- a/app/src/main/java/com/unogame/ui/components/PlayerAvatar.kt +++ b/app/src/main/java/com/unogame/ui/components/PlayerAvatar.kt @@ -27,15 +27,15 @@ fun PlayerAvatar( modifier: Modifier = Modifier ) { val isBot = player.id.startsWith("bot_") - val accentColor = if (player.isCurrentTurn) GoldAccent else Color.Gray val avatar = if (isBot) getBotAvatar(player.name) else null - val bgColor = avatar?.color ?: accentColor + val playerColor = avatar?.color ?: GoldAccent + val borderColor = if (player.isCurrentTurn) GoldAccent else playerColor Row( modifier = modifier .clip(RoundedCornerShape(12.dp)) .background(if (isYou) DarkSurface.copy(alpha = 0.8f) else DarkCard) - .border(2.dp, accentColor, RoundedCornerShape(12.dp)) + .border(2.dp, borderColor, RoundedCornerShape(12.dp)) .padding(horizontal = 12.dp, vertical = 8.dp), verticalAlignment = Alignment.CenterVertically ) { @@ -43,7 +43,7 @@ fun PlayerAvatar( modifier = Modifier .size(36.dp) .clip(CircleShape) - .background(bgColor), + .background(playerColor), contentAlignment = Alignment.Center ) { if (avatar != null) { @@ -67,7 +67,7 @@ fun PlayerAvatar( Row(verticalAlignment = Alignment.CenterVertically) { Text( text = player.name, - color = Color.White, + color = if (isBot) playerColor else Color.White, fontWeight = FontWeight.Bold, fontSize = 14.sp )