mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 08:45:27 +02:00
Fix "expand more" button rotation
This commit is contained in:
parent
bf0bb11e03
commit
e14cd51070
@ -37,7 +37,7 @@ import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.ExpandLess
|
||||
import androidx.compose.material.icons.filled.ExpandMore
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.IconButtonDefaults
|
||||
@ -209,7 +209,7 @@ private fun PortraitKeyboardLoading(
|
||||
onClick = { },
|
||||
colors = IconButtonDefaults.iconButtonColors(containerColor = MaterialTheme.colorScheme.inverseOnSurface)
|
||||
) {
|
||||
Icon(Icons.Default.ExpandLess, null)
|
||||
Icon(Icons.Default.ExpandMore, null)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -274,7 +274,7 @@ private fun PortraitKeyboard(
|
||||
var showAdditional: Boolean by remember { mutableStateOf(false) }
|
||||
var invMode: Boolean by remember { mutableStateOf(false) }
|
||||
val expandRotation: Float by animateFloatAsState(
|
||||
targetValue = if (showAdditional) 0f else 180f,
|
||||
targetValue = if (showAdditional) 180f else 0f,
|
||||
animationSpec = tween(easing = FastOutSlowInEasing),
|
||||
label = "Rotate on expand"
|
||||
)
|
||||
@ -347,7 +347,7 @@ private fun PortraitKeyboard(
|
||||
onClick = { showAdditional = !showAdditional },
|
||||
colors = IconButtonDefaults.iconButtonColors(containerColor = MaterialTheme.colorScheme.inverseOnSurface)
|
||||
) {
|
||||
Icon(Icons.Default.ExpandLess, null, Modifier.rotate(expandRotation))
|
||||
Icon(Icons.Default.ExpandMore, null, Modifier.rotate(expandRotation))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user