Skip to content

Commit

Permalink
Merge pull request #2542 from aneesh1122/master
Browse files Browse the repository at this point in the history
Improved Landscape Gradient
  • Loading branch information
fast4x authored Jun 30, 2024
2 parents 3eff996 + 2bbde48 commit 26d9e42
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -878,14 +878,15 @@ fun PlayerModern(
contentScale = ContentScale.Crop,
sizeToIntrinsics = false
)
.background(
.background(
Brush.verticalGradient(
0.0f to if (bottomgradient) if (isLandscape) if (colorPaletteMode == ColorPaletteMode.Light) Color.White.copy(0.15f) else Color.Black.copy(0.25f) else Color.Transparent else Color.Transparent,
1.0f to if (bottomgradient) if (colorPaletteMode == ColorPaletteMode.Light) Color.White.copy(if (isLandscape) 0.15f else 0.55f) else Color.Black.copy(if (isLandscape) 0.25f else 0.75f) else Color.Transparent,
startY = if (isLandscape) 0f else if (expandedplayer) 1300f else 950f,
0.0f to Color.Transparent,
1.0f to if (bottomgradient) if (colorPaletteMode == ColorPaletteMode.Light) Color.White.copy(if (isLandscape) 0.8f else 0.75f) else Color.Black.copy(if (isLandscape) 0.8f else 0.75f) else Color.Transparent,
startY = if (isLandscape) 600f else if (expandedplayer) 1300f else 950f,
endY = POSITIVE_INFINITY
)
)
.background(if (bottomgradient) if (isLandscape) if (colorPaletteMode == ColorPaletteMode.Light) Color.White.copy(0.25f) else Color.Black.copy(0.25f) else Color.Transparent else Color.Transparent)
.combinedClickable(
interactionSource = remember { MutableInteractionSource() },
indication = null,
Expand Down

0 comments on commit 26d9e42

Please sign in to comment.