Fix issue with Gradient rendering.
This commit is contained in:
parent
b8cb2d92e9
commit
83d9e77c6a
1 changed files with 6 additions and 2 deletions
|
|
@ -145,13 +145,17 @@ private fun Modifier.focusedEvent(
|
|||
ElementTheme.materialColors.background
|
||||
)
|
||||
val verticalOffset = focusedEventOffset.toPx()
|
||||
val verticalRatio = 0.7f
|
||||
return drawWithCache {
|
||||
val brush = Brush.verticalGradient(gradientColors)
|
||||
val brush = Brush.verticalGradient(
|
||||
colors = gradientColors,
|
||||
endY = size.height * verticalRatio,
|
||||
)
|
||||
onDrawBehind {
|
||||
drawRect(
|
||||
brush,
|
||||
topLeft = Offset(0f, verticalOffset),
|
||||
size = Size(size.width, size.height * 0.7f)
|
||||
size = Size(size.width, size.height * verticalRatio)
|
||||
)
|
||||
drawLine(
|
||||
highlightedLineColor,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue