Skip to content

Commit

Permalink
Duh
Browse files Browse the repository at this point in the history
  • Loading branch information
MM2-0 committed Aug 24, 2022
1 parent 2d22b66 commit e9e4e28
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private fun CardMiddlePiece(
val absoluteElevation = LocalAbsoluteTonalElevation.current + elevation
Box(
modifier = modifier
.shadow(elevation, RectangleShape, true)
.shadow(if (backgroundOpacity < 1f) 0.dp else elevation, RectangleShape, true)
.background(
if (backgroundOpacity == 1f) {
MaterialTheme.colorScheme.surfaceColorAtElevation(absoluteElevation)
Expand Down Expand Up @@ -149,7 +149,7 @@ private fun CardEndPiece(
val absoluteElevation = LocalAbsoluteTonalElevation.current + elevation
Box(
modifier = modifier
.shadow(elevation, shape, true)
.shadow(if (backgroundOpacity < 1f) 0.dp else elevation, shape, true)
.background(
if (backgroundOpacity == 1f) {
MaterialTheme.colorScheme.surfaceColorAtElevation(absoluteElevation)
Expand All @@ -170,6 +170,7 @@ private fun CardEndPiece(
Density(density, fontScale)
)
onDrawBehind {
if (borderWidth == 0.dp) return@onDrawBehind
withTransform({
translate(0f, if (isBottom) -border else 0f)
}) {
Expand Down

0 comments on commit e9e4e28

Please sign in to comment.