forked from melod1n/fast-messenger
Style: Update message bubble colors
Updates the container colors for incoming and outgoing message bubbles to align with Material 3 design tokens. - The outgoing message bubble container color is changed from `surfaceColorAtElevation(2.dp)` to `surfaceContainer`. - The reply container color within an outgoing message is changed from `primaryContainer` to `surfaceContainerHighest`. Additionally, the `@Preview` for `MessageBubble` is updated to display both an incoming and an outgoing message for better design validation.
This commit is contained in:
+22
-2
@@ -267,9 +267,9 @@ private fun messageBubbleColors(isOut: Boolean): MessageBubbleColors {
|
|||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
MessageBubbleColors(
|
MessageBubbleColors(
|
||||||
container = MaterialTheme.colorScheme.surfaceColorAtElevation(2.dp),
|
container = MaterialTheme.colorScheme.surfaceContainer,
|
||||||
content = MaterialTheme.colorScheme.onSurface,
|
content = MaterialTheme.colorScheme.onSurface,
|
||||||
replyContainer = MaterialTheme.colorScheme.primaryContainer
|
replyContainer = MaterialTheme.colorScheme.surfaceContainerHighest
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -277,6 +277,7 @@ private fun messageBubbleColors(isOut: Boolean): MessageBubbleColors {
|
|||||||
@Preview
|
@Preview
|
||||||
@Composable
|
@Composable
|
||||||
private fun Bubble() {
|
private fun Bubble() {
|
||||||
|
Column {
|
||||||
MessageBubble(
|
MessageBubble(
|
||||||
modifier = Modifier,
|
modifier = Modifier,
|
||||||
text = AnnotatedString("Some cool text"),
|
text = AnnotatedString("Some cool text"),
|
||||||
@@ -294,4 +295,23 @@ private fun Bubble() {
|
|||||||
onClick = {},
|
onClick = {},
|
||||||
onLongClick = {},
|
onLongClick = {},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
MessageBubble(
|
||||||
|
modifier = Modifier,
|
||||||
|
text = AnnotatedString("Some cool text"),
|
||||||
|
isOut = false,
|
||||||
|
date = "19:01",
|
||||||
|
isEdited = true,
|
||||||
|
isRead = true,
|
||||||
|
sendingStatus = SendingStatus.SENT,
|
||||||
|
isPinned = true,
|
||||||
|
isImportant = true,
|
||||||
|
isSelected = false,
|
||||||
|
attachments = emptyImmutableList(),
|
||||||
|
replyTitle = "Danil Nikolaev",
|
||||||
|
replySummary = "2 photos",
|
||||||
|
onClick = {},
|
||||||
|
onLongClick = {},
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user