Skip to content

Commit

Permalink
fix: icon placement in rtl layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
JunkFood02 committed Oct 2, 2024
1 parent 10b1562 commit a35f21e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ private fun ActionIconBox(
layout(width = placeable.width, height = placeable.height) {
// Align icon with the left/right edge of the content being swiped.
val iconOffset = if (action.isOnRightSide) constraints.maxWidth + offset else offset - placeable.width
placeable.placeRelative(x = iconOffset.roundToInt(), y = 0)
placeable.place(x = iconOffset.roundToInt(), y = 0)
}
}
.background(color = backgroundColor),
horizontalArrangement = if (action.isOnRightSide) Arrangement.Start else Arrangement.End,
horizontalArrangement = if (action.isOnRightSide) Arrangement.Absolute.Left else Arrangement.Absolute.Right,
verticalAlignment = Alignment.CenterVertically,
) {
content()
Expand Down

0 comments on commit a35f21e

Please sign in to comment.