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

Commit 00d117ec authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[SB][Chips] Align 3-2-1 countdown within the center of the chip.

Only really noticeable with the `1`, because we're using the
`neverDecreaseWidth` modifier and the `1` is narrower than other numbers
so it has extra space that needs to go somewhere.

Fixes: 412425303
Flag: com.android.systemui.status_bar_chips_modernization
Test: In RTL language, start screen recording -> verify 1 in 3-2-1
countdown is centered. Verify the same for LTR language

Change-Id: I2ac1e1adc7339c95ecdfd8e6d00502d6f83b29bd
parent d884817c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.text.TextMeasurer
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.rememberTextMeasurer
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.Constraints
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.Dp
@@ -114,6 +115,7 @@ fun ChipContent(
                style = textStyle,
                color = textColor,
                softWrap = false,
                textAlign = TextAlign.Center,
                modifier = modifier.neverDecreaseWidth(density),
            )
        }