From d18c14b15220f5aafb80a79a1cc0abccc30573e1 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Sun, 2 Oct 2022 15:42:26 +0100 Subject: [PATCH] using bubble colour with alpha for the reply background + some tweaks to padding and corners --- .../main/kotlin/app/dapk/st/messenger/MessengerScreen.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/features/messenger/src/main/kotlin/app/dapk/st/messenger/MessengerScreen.kt b/features/messenger/src/main/kotlin/app/dapk/st/messenger/MessengerScreen.kt index 1de7cb4..3d71f5d 100644 --- a/features/messenger/src/main/kotlin/app/dapk/st/messenger/MessengerScreen.kt +++ b/features/messenger/src/main/kotlin/app/dapk/st/messenger/MessengerScreen.kt @@ -477,8 +477,8 @@ private fun ReplyBubbleContent(content: BubbleContent) { Column( Modifier .fillMaxWidth() - .background(if (content.isNotSelf) SmallTalkTheme.extendedColors.otherBubbleReplyBackground else SmallTalkTheme.extendedColors.selfBubbleReplyBackground) - .padding(4.dp) + .background(if (content.isNotSelf) SmallTalkTheme.extendedColors.onOthersBubble.copy(alpha = 0.1f) else SmallTalkTheme.extendedColors.onSelfBubble.copy(alpha = 0.2f), RoundedCornerShape(12.dp)) + .padding(8.dp) ) { val replyName = if (!content.isNotSelf && content.message.replyingToSelf) "You" else content.message.replyingTo.author.displayName ?: content.message.replyingTo.author.id.value @@ -488,12 +488,13 @@ private fun ReplyBubbleContent(content: BubbleContent) { maxLines = 1, color = content.textColor() ) + Spacer(modifier = Modifier.height(2.dp)) when (val replyingTo = content.message.replyingTo) { is Message -> { Text( text = replyingTo.content, - color = content.textColor(), - fontSize = 15.sp, + color = content.textColor().copy(alpha = 0.8f), + fontSize = 14.sp, modifier = Modifier.wrapContentSize(), textAlign = TextAlign.Start, )