soften bottom dock scrim — transparent gradient instead of opaque block

Keyboard closed: 0% → 25% → 55% alpha gradient.
Keyboard open: 50% → 85% instead of solid fill.
Pills and input now float over the mesh background.
This commit is contained in:
Bruno Deanoz 2026-06-22 18:58:04 +02:00
parent 34a527cdb6
commit f703196087

View file

@ -809,14 +809,18 @@ fun ChatScreen(
.offset(y = with(LocalDensity.current) { -bottomOffset.toDp() }) .offset(y = with(LocalDensity.current) { -bottomOffset.toDp() })
.background( .background(
if (imeVisible) { if (imeVisible) {
Brush.verticalGradient(listOf(scrimColor, scrimColor)) Brush.verticalGradient(
colorStops = arrayOf(
0f to scrimColor.copy(alpha = 0.5f),
1f to scrimColor.copy(alpha = 0.85f),
),
)
} else { } else {
Brush.verticalGradient( Brush.verticalGradient(
colorStops = arrayOf( colorStops = arrayOf(
0f to Color.Transparent, 0f to Color.Transparent,
0.35f to scrimColor.copy(alpha = 0.6f), 0.5f to scrimColor.copy(alpha = 0.25f),
0.7f to scrimColor.copy(alpha = 0.92f), 1f to scrimColor.copy(alpha = 0.55f),
1f to scrimColor,
), ),
) )
} }