mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-05-03 15:24: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
|
import app.revanced.manager.R
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ArrowButton(expanded: Boolean, onClick: () -> Unit) {
|
fun ArrowButton(modifier: Modifier = Modifier, expanded: Boolean,onClick: () -> Unit) {
|
||||||
IconButton(onClick = onClick) {
|
IconButton(onClick = onClick) {
|
||||||
val description = if (expanded) R.string.collapse_content else R.string.expand_content
|
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(
|
Icon(
|
||||||
imageVector = Icons.Filled.KeyboardArrowUp,
|
imageVector = Icons.Filled.KeyboardArrowUp,
|
||||||
contentDescription = stringResource(description),
|
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))
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
|
|
||||||
ArrowButton(expanded = expanded) {
|
ArrowButton(modifier = Modifier.size(24.dp), expanded = expanded) {
|
||||||
expanded = !expanded
|
expanded = !expanded
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -239,7 +239,10 @@ fun InstallStep(step: Step) {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (stacktrace != null) {
|
if (stacktrace != null) {
|
||||||
ArrowButton(expanded = messageExpanded) {
|
ArrowButton(
|
||||||
|
modifier = Modifier.size(24.dp),
|
||||||
|
expanded = messageExpanded
|
||||||
|
) {
|
||||||
messageExpanded = !messageExpanded
|
messageExpanded = !messageExpanded
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user