Fix more UI bugs

This commit is contained in:
Nullptr 2022-03-01 19:35:17 +08:00
parent a44cd8ba3b
commit 4b7d644c43
1 changed files with 66 additions and 62 deletions

View File

@ -306,10 +306,13 @@ private fun DoPatchBody(
}
}
BoxWithConstraints(modifier.padding(24.dp)) {
val shellBoxMaxHeight =
if (patchState == PatchState.PATCHING) maxHeight
else maxHeight - ButtonDefaults.MinHeight - 12.dp
Column(
modifier
Modifier
.fillMaxSize()
.padding(24.dp)
.wrapContentHeight()
.animateContentSize(spring(stiffness = Spring.StiffnessLow))
) {
@ -322,7 +325,7 @@ private fun DoPatchBody(
state = scrollState,
modifier = Modifier
.fillMaxWidth()
.heightIn(max = 320.dp)
.heightIn(max = shellBoxMaxHeight)
.clip(RoundedCornerShape(32.dp))
.background(brush)
.padding(horizontal = 24.dp, vertical = 18.dp)
@ -378,3 +381,4 @@ private fun DoPatchBody(
}
}
}
}