mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-05-03 07:14:25 +02:00
feat(installer): adjust arrow icon size
This commit is contained in:
parent
6437f7bb65
commit
39caad18a5
@ -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)
|
||||
)
|
||||
}
|
||||
}
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user