Is the opacity of the `drawShadow` modifier suppo...
# compose
a
Is the opacity of the
drawShadow
modifier supposed to change the opacity of the whole Box? Changing the
0.3f
opacity changes the opacity of the whole box and its contents. Simplified example:
Copy code
@Composable
private fun StrangeButton() {
    Box(
        modifier = Modifier.then(
            Modifier.drawShadow(
                elevation = 4.dp,
                opacity = 0.3f
            )
        ).then(
            Modifier.background(
                color = Color.Green
            )
        )
    ) {
        Image(
            asset = Icons.Default.Person,
            colorFilter = ColorFilter.tint(Color.White)
        )
    }
}
z
Pretty sure it's not, I'd file a bug
FYI you can write your modifiers more concisely:
Copy code
Modifier
  .drawShadow(…)
  .background(…)
☝️ 1
🎉 1
a
Done: https://issuetracker.google.com/issues/171624638 Thanks for that tip @Zach Klippenstein (he/him) [MOD]!