Skip to content

Commit

Permalink
Adds a small border between the author and the message of a chat bubble
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorpamplona committed Aug 27, 2024
1 parent 42ab826 commit 4665c48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -332,7 +333,7 @@ fun ChatBubbleLayout(
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = alignment,
modifier = HalfHalfTopPadding.clickable(onClick = onAuthorClick),
modifier = HalfHalfVertPadding.clickable(onClick = onAuthorClick),
) {
drawAuthorLine()
}
Expand Down Expand Up @@ -389,7 +390,8 @@ private fun BubblePreview() {
modifier =
Modifier
.size(Size20dp)
.clip(CircleShape),
.clip(CircleShape)
.background(Color.LightGray),
)
},
name = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4665c48

Please sign in to comment.