Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 665c4e90 authored by Azhara Assanova's avatar Azhara Assanova
Browse files

Fix button padding for right to left languages in SpaDialog

Bug: 404595525
Test: visual
Flag: EXEMPT bug fix
Change-Id: I01a1cdd68999a36f5669ac74d23dbe76e1c07b69
parent 97faf816
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import androidx.compose.ui.layout.Placeable
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp
import androidx.compose.ui.util.fastForEach
import androidx.compose.ui.util.fastForEachIndexed
@@ -226,7 +227,12 @@ internal fun AlertDialogFlowRow(
                val childrenMainAxisSizes =
                    IntArray(placeables.size) { j ->
                        placeables[j].width +
                            if (j < placeables.lastIndex) mainAxisSpacing.roundToPx() else 0
                            if ((layoutDirection == LayoutDirection.Ltr && j < placeables.lastIndex)
                                    || (layoutDirection == LayoutDirection.Rtl && j > 0)) {
                                mainAxisSpacing.roundToPx()
                            } else {
                                0
                            }
                    }
                val arrangement = Arrangement.End
                val mainAxisPositions = IntArray(childrenMainAxisSizes.size) { 0 }