ChatInfoImage: place default avatar one canvas-shade darker than the canvas

secondary (#8B8786) was too dark. Use background mixed with onBackground at 0.88 — same darkening recipe as canvasColorForCurrentTheme uses with 0.94, applied a step further. On LIGHT this lands near #E1E1E1: 15 units darker than the canvas, matching how the canvas sits 15 darker than white.
This commit is contained in:
another-simple-pixel
2026-05-16 14:29:50 -07:00
parent 32ddd09c8f
commit 0b8be6db00
@@ -25,7 +25,7 @@ import dev.icerock.moko.resources.ImageResource
import kotlin.math.max
@Composable
fun ChatInfoImage(chatInfo: ChatInfo, size: Dp, iconColor: Color = MaterialTheme.colors.secondary, shadow: Boolean = false) {
fun ChatInfoImage(chatInfo: ChatInfo, size: Dp, iconColor: Color = MaterialTheme.colors.background.mixWith(MaterialTheme.colors.onBackground, 0.88f), shadow: Boolean = false) {
val icon =
when (chatInfo) {
is ChatInfo.Group -> chatInfo.groupInfo.chatIconName
@@ -52,7 +52,7 @@ fun ProfileImage(
size: Dp,
image: String? = null,
icon: ImageResource = MR.images.ic_account_circle_filled,
color: Color = MaterialTheme.colors.secondary,
color: Color = MaterialTheme.colors.background.mixWith(MaterialTheme.colors.onBackground, 0.88f),
backgroundColor: Color? = null,
blurred: Boolean = false,
async: Boolean = false