diff --git a/lib/maplibre-compose-material3/src/commonMain/kotlin/dev/sargunv/maplibrecompose/material3/Alignment.kt b/lib/maplibre-compose-material3/src/commonMain/kotlin/dev/sargunv/maplibrecompose/material3/Alignment.kt index 68ebe3c5..ebf6388b 100644 --- a/lib/maplibre-compose-material3/src/commonMain/kotlin/dev/sargunv/maplibrecompose/material3/Alignment.kt +++ b/lib/maplibre-compose-material3/src/commonMain/kotlin/dev/sargunv/maplibrecompose/material3/Alignment.kt @@ -6,21 +6,23 @@ import androidx.compose.ui.BiasAlignment import androidx.compose.ui.unit.IntSize import androidx.compose.ui.unit.LayoutDirection -private val Alignment.horizontalBias: Float get() { - val align = align(IntSize.Zero, IntSize(10_000_000, 1), LayoutDirection.Ltr) - return align.x / 5_000_000f - 1f -} +private val Alignment.horizontalBias: Float + get() { + val align = align(IntSize.Zero, IntSize(10_000_000, 1), LayoutDirection.Ltr) + return align.x / 5_000_000f - 1f + } -internal val Alignment.horizontal: Alignment.Horizontal get() = - BiasAlignment.Horizontal(horizontalBias) +internal val Alignment.horizontal: Alignment.Horizontal + get() = BiasAlignment.Horizontal(horizontalBias) -private val Alignment.verticalBias: Float get() { - val align = align(IntSize.Zero, IntSize(1, 10_000_000), LayoutDirection.Ltr) - return align.y / 5_000_000f - 1f -} +private val Alignment.verticalBias: Float + get() { + val align = align(IntSize.Zero, IntSize(1, 10_000_000), LayoutDirection.Ltr) + return align.y / 5_000_000f - 1f + } -internal val Alignment.vertical: Alignment.Vertical get() = - BiasAlignment.Vertical(verticalBias) +internal val Alignment.vertical: Alignment.Vertical + get() = BiasAlignment.Vertical(verticalBias) internal fun Alignment.Horizontal.toArrangement(): Arrangement.Horizontal { val align = align(0, 2, LayoutDirection.Ltr) diff --git a/lib/maplibre-compose-material3/src/commonMain/kotlin/dev/sargunv/maplibrecompose/material3/controls/AttributionButton.kt b/lib/maplibre-compose-material3/src/commonMain/kotlin/dev/sargunv/maplibrecompose/material3/controls/AttributionButton.kt index 513dd872..783df67c 100644 --- a/lib/maplibre-compose-material3/src/commonMain/kotlin/dev/sargunv/maplibrecompose/material3/controls/AttributionButton.kt +++ b/lib/maplibre-compose-material3/src/commonMain/kotlin/dev/sargunv/maplibrecompose/material3/controls/AttributionButton.kt @@ -102,21 +102,20 @@ public fun AttributionButton( CompositionLocalProvider( LocalContentColor provides contentColor, - LocalLayoutDirection provides rowLayoutDirection + LocalLayoutDirection provides rowLayoutDirection, ) { Box(modifier = modifier, contentAlignment = Alignment.CenterStart) { - AnimatedVisibility(expanded, modifier = Modifier.matchParentSize()) { Box( Modifier.matchParentSize() - .padding(4.dp) - .background(surfaceColor, RoundedCornerShape(cornerSize)) + .padding(4.dp) + .background(surfaceColor, RoundedCornerShape(cornerSize)) ) } Row( horizontalArrangement = Arrangement.Start, - verticalAlignment = Alignment.CenterVertically + verticalAlignment = Alignment.CenterVertically, ) { InfoIconButton( onClick = { expanded = !expanded }, @@ -163,14 +162,13 @@ private fun AttributionTexts( modifier: Modifier = Modifier, ) { ProvideTextStyle(textStyle) { - FlowRow( - modifier = modifier, - horizontalArrangement = Arrangement.spacedBy(4.dp), - ) { + FlowRow(modifier = modifier, horizontalArrangement = Arrangement.spacedBy(4.dp)) { attributions.forEach { - Text(buildAnnotatedString { - withLink(LinkAnnotation.Url(url = it.url, styles = textLinkStyles)) { append(it.title) } - }) + Text( + buildAnnotatedString { + withLink(LinkAnnotation.Url(url = it.url, styles = textLinkStyles)) { append(it.title) } + } + ) } } }