From 1125c4e8f5760fd0c6c0d070f16d555541f57152 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 2 Dec 2025 18:20:06 -0500 Subject: [PATCH] Creates a new size for the score tag due to the size of DM Group headers --- .../amethyst/ui/note/UserProfilePicture.kt | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UserProfilePicture.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UserProfilePicture.kt index 0d08c2122..06a62f2f9 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UserProfilePicture.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/UserProfilePicture.kt @@ -58,6 +58,7 @@ import com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.rooms.LoadUser import com.vitorpamplona.amethyst.ui.screen.loggedIn.mockAccountViewModel import com.vitorpamplona.amethyst.ui.stringRes import com.vitorpamplona.amethyst.ui.theme.Font10SP +import com.vitorpamplona.amethyst.ui.theme.Font6SP import com.vitorpamplona.amethyst.ui.theme.Font8SP import com.vitorpamplona.amethyst.ui.theme.SmallBorder import com.vitorpamplona.amethyst.ui.theme.ThemeComparisonColumn @@ -510,8 +511,10 @@ fun ScoreTag( ) { if (size > 34.dp) { ScoreTagRegular(score, modifier) - } else { + } else if (size > 23.dp) { ScoreTagSmall(score, modifier) + } else { + ScoreTagSmallest(score, modifier) } } @@ -557,6 +560,27 @@ fun ScoreTagSmall( ) } +@Composable +fun ScoreTagSmallest( + score: Int, + modifier: Modifier, +) { + Text( + text = score.toString(), + color = Color.White, + fontWeight = FontWeight.Bold, + fontSize = Font6SP, + maxLines = 1, + overflow = TextOverflow.Clip, + lineHeight = Font6SP, + modifier = + modifier + .clip(SmallBorder) + .background(Color.Black) + .padding(horizontal = 2.dp, vertical = 0.dp), + ) +} + @Composable fun LoadUserProfilePicture( baseUser: User,