```modifier = Modifier .fillMaxWidth() .dr...
# compose-desktop
g
Copy code
modifier = Modifier
    .fillMaxWidth()
    .drawWithCache {
        val gradient = Brush.horizontalGradient(colors = listOf(Color.DarkGray, Color.Transparent, Color.DarkGray))
        onDrawWithContent {
            drawContent()
            drawRect(
                brush = gradient,
                size = size,
                blendMode = BlendMode.Darken
            )
        }
    }
In the preview this is rendered correctly, when running the app it’s not, it only draws the Rect “ignoring” the composable in the background. Any idea? 🤔