Merge pull request #1672 from bemusementpark/ItemButton

Fix ItemButton padding for downstate
This commit is contained in:
ThomasSession 2024-09-20 09:50:34 +10:00 committed by GitHub
commit 89a854e8d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -277,21 +277,19 @@ fun ItemButton(
TextButton(
modifier = modifier.fillMaxWidth()
.height(IntrinsicSize.Min)
.heightIn(min = minHeight)
.padding(horizontal = LocalDimensions.current.xsSpacing),
.heightIn(min = minHeight),
colors = colors,
onClick = onClick,
contentPadding = PaddingValues(),
shape = RectangleShape,
) {
Box(
modifier = Modifier.fillMaxHeight()
.aspectRatio(1f)
.align(Alignment.CenterVertically)
) {
icon()
}
Spacer(modifier = Modifier.width(LocalDimensions.current.smallSpacing))
.padding(horizontal = LocalDimensions.current.xxsSpacing)
.aspectRatio(1f),
content = icon
)
Text(
text,