mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-08 23:54:39 +00:00
Merge pull request #2943 from vitorpamplona/claude/fix-show-more-gradient-WruXm
Fix gradient rendering with transparent background colors
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user