Duh
This commit is contained in:
parent
2d22b66a16
commit
e9e4e28760
@ -85,7 +85,7 @@ private fun CardMiddlePiece(
|
|||||||
val absoluteElevation = LocalAbsoluteTonalElevation.current + elevation
|
val absoluteElevation = LocalAbsoluteTonalElevation.current + elevation
|
||||||
Box(
|
Box(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.shadow(elevation, RectangleShape, true)
|
.shadow(if (backgroundOpacity < 1f) 0.dp else elevation, RectangleShape, true)
|
||||||
.background(
|
.background(
|
||||||
if (backgroundOpacity == 1f) {
|
if (backgroundOpacity == 1f) {
|
||||||
MaterialTheme.colorScheme.surfaceColorAtElevation(absoluteElevation)
|
MaterialTheme.colorScheme.surfaceColorAtElevation(absoluteElevation)
|
||||||
@ -149,7 +149,7 @@ private fun CardEndPiece(
|
|||||||
val absoluteElevation = LocalAbsoluteTonalElevation.current + elevation
|
val absoluteElevation = LocalAbsoluteTonalElevation.current + elevation
|
||||||
Box(
|
Box(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.shadow(elevation, shape, true)
|
.shadow(if (backgroundOpacity < 1f) 0.dp else elevation, shape, true)
|
||||||
.background(
|
.background(
|
||||||
if (backgroundOpacity == 1f) {
|
if (backgroundOpacity == 1f) {
|
||||||
MaterialTheme.colorScheme.surfaceColorAtElevation(absoluteElevation)
|
MaterialTheme.colorScheme.surfaceColorAtElevation(absoluteElevation)
|
||||||
@ -170,6 +170,7 @@ private fun CardEndPiece(
|
|||||||
Density(density, fontScale)
|
Density(density, fontScale)
|
||||||
)
|
)
|
||||||
onDrawBehind {
|
onDrawBehind {
|
||||||
|
if (borderWidth == 0.dp) return@onDrawBehind
|
||||||
withTransform({
|
withTransform({
|
||||||
translate(0f, if (isBottom) -border else 0f)
|
translate(0f, if (isBottom) -border else 0f)
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user