Set corner radius of nav bar icons to half height.

This commit is contained in:
Alex Hart
2025-04-09 13:51:15 -03:00
committed by Michelle Tang
parent 4700846fad
commit 2f8b0ff3a8

View File

@@ -184,13 +184,14 @@ private fun Modifier.drawNavigationBarBadge(count: Int, compact: Boolean): Modif
drawContent()
val xOffset = size.width.toFloat() / 2f + xOffsetExtra
val yRadius = size.height.toFloat() / 2f
if (size != IntSize.Zero) {
drawRoundRect(
color = color,
topLeft = Offset(xOffset, yOffset),
size = Size(textLayoutResult.size.width.toFloat() + padding * 2, textLayoutResult.size.height.toFloat()),
cornerRadius = CornerRadius(20f, 20f)
cornerRadius = CornerRadius(yRadius, yRadius)
)
drawText(