From 4665c488d5c340b68708b90d7416802ba0daac03 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 27 Aug 2024 15:57:56 -0400 Subject: [PATCH] Adds a small border between the author and the message of a chat bubble --- .../amethyst/ui/note/ChatroomMessageCompose.kt | 8 +++++--- .../java/com/vitorpamplona/amethyst/ui/theme/Shape.kt | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ChatroomMessageCompose.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ChatroomMessageCompose.kt index 56ee4a456..8e4410df5 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ChatroomMessageCompose.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ChatroomMessageCompose.kt @@ -21,6 +21,7 @@ package com.vitorpamplona.amethyst.ui.note import androidx.compose.foundation.ExperimentalFoundationApi +import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.combinedClickable import androidx.compose.foundation.layout.Arrangement @@ -71,7 +72,7 @@ import com.vitorpamplona.amethyst.ui.theme.ChatPaddingInnerQuoteModifier import com.vitorpamplona.amethyst.ui.theme.ChatPaddingModifier import com.vitorpamplona.amethyst.ui.theme.DoubleHorzSpacer import com.vitorpamplona.amethyst.ui.theme.Font12SP -import com.vitorpamplona.amethyst.ui.theme.HalfHalfTopPadding +import com.vitorpamplona.amethyst.ui.theme.HalfHalfVertPadding import com.vitorpamplona.amethyst.ui.theme.ReactionRowHeightChat import com.vitorpamplona.amethyst.ui.theme.RowColSpacing import com.vitorpamplona.amethyst.ui.theme.RowColSpacing5dp @@ -332,7 +333,7 @@ fun ChatBubbleLayout( Row( verticalAlignment = Alignment.CenterVertically, horizontalArrangement = alignment, - modifier = HalfHalfTopPadding.clickable(onClick = onAuthorClick), + modifier = HalfHalfVertPadding.clickable(onClick = onAuthorClick), ) { drawAuthorLine() } @@ -389,7 +390,8 @@ private fun BubblePreview() { modifier = Modifier .size(Size20dp) - .clip(CircleShape), + .clip(CircleShape) + .background(Color.LightGray), ) }, name = { diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt index f767a54ee..da3a04d88 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt @@ -107,7 +107,7 @@ val HalfStartPadding = Modifier.padding(start = 5.dp) val StdStartPadding = Modifier.padding(start = 10.dp) val StdTopPadding = Modifier.padding(top = 10.dp) val HalfTopPadding = Modifier.padding(top = 5.dp) -val HalfHalfTopPadding = Modifier.padding(top = 3.dp) +val HalfHalfVertPadding = Modifier.padding(vertical = 3.dp) val HalfPadding = Modifier.padding(5.dp) val StdPadding = Modifier.padding(10.dp)