Avoid unnecessary zIndex

This commit is contained in:
GG Bond authored and renovate[bot] committed 2024-04-20 17:10:33 +08:00
1 parent 9a6f17c745
commit aa6ddac9c5
1 file changed
+10 -10
@@ -169,15 +169,6 @@ fun FabLayout(
}
}
}
FloatingActionButton(onClick = { onExpandChanged(!updatedExpanded) }) {
Icon(
imageVector = Icons.Default.Close,
contentDescription = null,
modifier = Modifier.graphicsLayer {
rotationZ = lerp(-135f, 0f, animatedProgress)
},
)
}
secondaryFab.run {
forEachIndexed { index, (imageVector, onClick) ->
SmallFloatingActionButton(
@@ -193,7 +184,7 @@ fun FabLayout(
val placeable = measurable.measure(constraints)
layout(placeable.width, placeable.height) {
val distance = lerp(0, 150 * (size - index) + 50, animatedProgress)
placeable.placeRelative(0, -distance, -(size - index).toFloat())
placeable.placeRelative(0, -distance)
}
},
) {
@@ -201,6 +192,15 @@ fun FabLayout(
}
}
}
FloatingActionButton(onClick = { onExpandChanged(!updatedExpanded) }) {
Icon(
imageVector = Icons.Default.Close,
contentDescription = null,
modifier = Modifier.graphicsLayer {
rotationZ = lerp(-135f, 0f, animatedProgress)
},
)
}
}
}
}