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:
parent
34a527cdb6
commit
f703196087
1 changed files with 8 additions and 4 deletions
|
|
@ -809,14 +809,18 @@ fun ChatScreen(
|
|||
.offset(y = with(LocalDensity.current) { -bottomOffset.toDp() })
|
||||
.background(
|
||||
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 {
|
||||
Brush.verticalGradient(
|
||||
colorStops = arrayOf(
|
||||
0f to Color.Transparent,
|
||||
0.35f to scrimColor.copy(alpha = 0.6f),
|
||||
0.7f to scrimColor.copy(alpha = 0.92f),
|
||||
1f to scrimColor,
|
||||
0.5f to scrimColor.copy(alpha = 0.25f),
|
||||
1f to scrimColor.copy(alpha = 0.55f),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue