Merge pull request #2943 from vitorpamplona/claude/fix-show-more-gradient-WruXm

Fix gradient rendering with transparent background colors
This commit is contained in:
Vitor Pamplona
2026-05-16 15:59:04 -04:00
committed by GitHub
@@ -1484,14 +1484,22 @@ fun RenderRepost(
}
}
fun getGradient(backgroundColor: MutableState<Color>): Brush =
Brush.verticalGradient(
@Composable
fun getGradient(backgroundColor: MutableState<Color>): Brush {
val solid =
if (backgroundColor.value.alpha == 0f) {
MaterialTheme.colorScheme.background
} else {
backgroundColor.value.copy(alpha = 1f)
}
return Brush.verticalGradient(
colors =
listOf(
backgroundColor.value.copy(alpha = 0f),
backgroundColor.value.copy(alpha = 1f),
solid.copy(alpha = 0f),
solid,
),
)
}
@Composable
fun ReplyNoteComposition(