From 39caad18a5f2fe7ab2e824516780cc61e30e0ce4 Mon Sep 17 00:00:00 2001 From: Ax333l Date: Thu, 5 Oct 2023 22:06:20 +0200 Subject: [PATCH] feat(installer): adjust arrow icon size --- .../java/app/revanced/manager/ui/component/ArrowButton.kt | 8 +++++--- .../app/revanced/manager/ui/screen/InstallerScreen.kt | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/app/revanced/manager/ui/component/ArrowButton.kt b/app/src/main/java/app/revanced/manager/ui/component/ArrowButton.kt index 2c1e3c19aa..3762ae2539 100644 --- a/app/src/main/java/app/revanced/manager/ui/component/ArrowButton.kt +++ b/app/src/main/java/app/revanced/manager/ui/component/ArrowButton.kt @@ -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) ) } } \ No newline at end of file diff --git a/app/src/main/java/app/revanced/manager/ui/screen/InstallerScreen.kt b/app/src/main/java/app/revanced/manager/ui/screen/InstallerScreen.kt index 5ec34ce5a2..c2a6d30052 100644 --- a/app/src/main/java/app/revanced/manager/ui/screen/InstallerScreen.kt +++ b/app/src/main/java/app/revanced/manager/ui/screen/InstallerScreen.kt @@ -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 {