feat(installer): adjust arrow icon size

This commit is contained in:
Ax333l 2023-10-05 22:06:20 +02:00
parent 6437f7bb65
commit 39caad18a5
No known key found for this signature in database
GPG Key ID: D2B4D85271127D23
2 changed files with 10 additions and 5 deletions

View File

@ -13,15 +13,17 @@ import androidx.compose.ui.res.stringResource
import app.revanced.manager.R
@Composable
fun ArrowButton(expanded: Boolean, onClick: () -> Unit) {
fun ArrowButton(modifier: Modifier = Modifier, expanded: Boolean,onClick: () -> Unit) {
IconButton(onClick = onClick) {
val description = if (expanded) R.string.collapse_content else R.string.expand_content
val rotation by animateFloatAsState(targetValue = if (expanded) 0f else 180f)
val rotation by animateFloatAsState(targetValue = if (expanded) 0f else 180f, label = "rotation")
Icon(
imageVector = Icons.Filled.KeyboardArrowUp,
contentDescription = stringResource(description),
modifier = Modifier.rotate(rotation)
modifier = Modifier
.rotate(rotation)
.then(modifier)
)
}
}

View File

@ -206,7 +206,7 @@ fun InstallStep(step: Step) {
Spacer(modifier = Modifier.weight(1f))
ArrowButton(expanded = expanded) {
ArrowButton(modifier = Modifier.size(24.dp), expanded = expanded) {
expanded = !expanded
}
}
@ -239,7 +239,10 @@ fun InstallStep(step: Step) {
)
if (stacktrace != null) {
ArrowButton(expanded = messageExpanded) {
ArrowButton(
modifier = Modifier.size(24.dp),
expanded = messageExpanded
) {
messageExpanded = !messageExpanded
}
} else {