mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-26 05:24:43 +00:00
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:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user