From a35f21e2e9650bb6c55d5b1cc62f057135c975d9 Mon Sep 17 00:00:00 2001 From: junkfood <69683722+JunkFood02@users.noreply.github.com> Date: Wed, 2 Oct 2024 19:11:14 +0800 Subject: [PATCH] fix: icon placement in rtl layouts --- .../commonMain/kotlin/me/saket/swipe/SwipeableActionsBox.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/commonMain/kotlin/me/saket/swipe/SwipeableActionsBox.kt b/library/src/commonMain/kotlin/me/saket/swipe/SwipeableActionsBox.kt index 9b2c837..71c4f71 100644 --- a/library/src/commonMain/kotlin/me/saket/swipe/SwipeableActionsBox.kt +++ b/library/src/commonMain/kotlin/me/saket/swipe/SwipeableActionsBox.kt @@ -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()