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( TextButton(
modifier = modifier.fillMaxWidth() modifier = modifier.fillMaxWidth()
.height(IntrinsicSize.Min) .height(IntrinsicSize.Min)
.heightIn(min = minHeight) .heightIn(min = minHeight),
.padding(horizontal = LocalDimensions.current.xsSpacing),
colors = colors, colors = colors,
onClick = onClick, onClick = onClick,
contentPadding = PaddingValues(),
shape = RectangleShape, shape = RectangleShape,
) { ) {
Box( Box(
modifier = Modifier.fillMaxHeight() modifier = Modifier.fillMaxHeight()
.aspectRatio(1f)
.align(Alignment.CenterVertically) .align(Alignment.CenterVertically)
) { .padding(horizontal = LocalDimensions.current.xxsSpacing)
icon() .aspectRatio(1f),
} content = icon
)
Spacer(modifier = Modifier.width(LocalDimensions.current.smallSpacing))
Text( Text(
text, text,