mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Fix issue with Gradient rendering.
This commit is contained in:
+6
-2
@@ -145,13 +145,17 @@ private fun Modifier.focusedEvent(
|
|||||||
ElementTheme.materialColors.background
|
ElementTheme.materialColors.background
|
||||||
)
|
)
|
||||||
val verticalOffset = focusedEventOffset.toPx()
|
val verticalOffset = focusedEventOffset.toPx()
|
||||||
|
val verticalRatio = 0.7f
|
||||||
return drawWithCache {
|
return drawWithCache {
|
||||||
val brush = Brush.verticalGradient(gradientColors)
|
val brush = Brush.verticalGradient(
|
||||||
|
colors = gradientColors,
|
||||||
|
endY = size.height * verticalRatio,
|
||||||
|
)
|
||||||
onDrawBehind {
|
onDrawBehind {
|
||||||
drawRect(
|
drawRect(
|
||||||
brush,
|
brush,
|
||||||
topLeft = Offset(0f, verticalOffset),
|
topLeft = Offset(0f, verticalOffset),
|
||||||
size = Size(size.width, size.height * 0.7f)
|
size = Size(size.width, size.height * verticalRatio)
|
||||||
)
|
)
|
||||||
drawLine(
|
drawLine(
|
||||||
highlightedLineColor,
|
highlightedLineColor,
|
||||||
|
|||||||
Reference in New Issue
Block a user