mattinger
02/08/2023, 10:22 PMKirill Grouchnikov
02/08/2023, 10:52 PMmattinger
02/08/2023, 11:14 PMKirill Grouchnikov
02/08/2023, 11:14 PMmattinger
02/08/2023, 11:16 PMKirill Grouchnikov
02/08/2023, 11:18 PMmattinger
02/08/2023, 11:37 PMMR3Y
02/08/2023, 11:40 PMmattinger
02/08/2023, 11:40 PMgraphicsLayer { alpha = 0.99F }
.drawWithContent {
val colors = listOf(Color.White.copy(alpha = 0f), Color.White)
drawContent()
drawRect(
// topLeft = Offset(0f, 0f),
size = Size(width = width.toPx(), height = size.height),
brush = Brush.horizontalGradient(colors),
blendMode = BlendMode.DstIn
)
}
But the second i set an explicit size, it just basically creates a box where everything in the box is faded, and everything outside of it is not. If I don’t set one, i get a full fade across the entire control.