diff --git a/app/shared/src/commonMain/kotlin/util/ReverseRow.kt b/app/shared/src/commonMain/kotlin/util/ReverseRow.kt deleted file mode 100644 index 276dc31a..00000000 --- a/app/shared/src/commonMain/kotlin/util/ReverseRow.kt +++ /dev/null @@ -1,40 +0,0 @@ -package dev.schlaubi.tonbrett.app.util - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.RowScope -import androidx.compose.runtime.Composable -import androidx.compose.runtime.CompositionLocalProvider -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.platform.LocalLayoutDirection -import androidx.compose.ui.unit.LayoutDirection - -/** - * Utility function reversing the layout of a [Row]. - * - * This can be usefuly if you want to layout something from Right to Left, but still render it from left to right - */ -@Composable -inline fun ReverseRow( - modifier: Modifier = Modifier, - horizontalArrangement: Arrangement.Horizontal = Arrangement.Start, - verticalAlignment: Alignment.Vertical = Alignment.Top, - crossinline content: @Composable RowScope.() -> Unit -) { - ProvideLayoutDirection(LayoutDirection.Rtl) { - Row(modifier, horizontalArrangement, verticalAlignment) { - ProvideLayoutDirection(LayoutDirection.Ltr) { - content() - } - } - } -} - -/** - * Utility function that changes the [LocalLayoutDirection] to [direction]. - */ -@Composable -fun ProvideLayoutDirection(direction: LayoutDirection, content: @Composable () -> Unit) { - CompositionLocalProvider(LocalLayoutDirection provides direction, content = content) -} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a7d68a68..e0b84aeb 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,7 +7,7 @@ mikbot = "3.26.0" ksp = "2.0.0-Beta1-1.0.14" kordex = "1.6.0-SNAPSHOT" android = "8.2.0" -compose = "1.5.11" +compose = "1.6.0-alpha01" compose-wear = "1.2.1" lyricist = "1.6.2" google-play = "2.1.0"