Browse Source

fix imageviewer uikit (#2574)

pull/2575/head
dima.avdeev 2 years ago committed by GitHub
parent
commit
327fa12651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      experimental/examples/imageviewer/shared/src/androidMain/kotlin/example/imageviewer/view/ScrollableColumn.android.kt
  2. 4
      experimental/examples/imageviewer/shared/src/commonMain/kotlin/example/imageviewer/view/ScrollableColumn.common.kt
  3. 2
      experimental/examples/imageviewer/shared/src/desktopMain/kotlin/example/imageviewer/view/ScrollableColumn.desktop.kt
  4. 2
      experimental/examples/imageviewer/shared/src/iosMain/kotlin/example/imageviewer/view/ScrollableColumn.ios.kt

2
experimental/examples/imageviewer/shared/src/androidMain/kotlin/example/imageviewer/view/ScrollableColumn.android.kt

@ -4,5 +4,5 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
@Composable @Composable
actual fun ScrollableColumn(modifier: Modifier, content: @Composable () -> Unit) = internal actual fun ScrollableColumn(modifier: Modifier, content: @Composable () -> Unit) =
TouchScrollableColumn(modifier, content) TouchScrollableColumn(modifier, content)

4
experimental/examples/imageviewer/shared/src/commonMain/kotlin/example/imageviewer/view/ScrollableColumn.common.kt

@ -7,10 +7,10 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
@Composable @Composable
expect fun ScrollableColumn(modifier: Modifier, content: @Composable () -> Unit) internal expect fun ScrollableColumn(modifier: Modifier, content: @Composable () -> Unit)
@Composable @Composable
fun TouchScrollableColumn(modifier: Modifier, content: @Composable () -> Unit) { internal fun TouchScrollableColumn(modifier: Modifier, content: @Composable () -> Unit) {
val scrollState = rememberScrollState() val scrollState = rememberScrollState()
Column(modifier.verticalScroll(scrollState)) { Column(modifier.verticalScroll(scrollState)) {
content() content()

2
experimental/examples/imageviewer/shared/src/desktopMain/kotlin/example/imageviewer/view/ScrollableColumn.desktop.kt

@ -11,7 +11,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
@Composable @Composable
actual fun ScrollableColumn(modifier: Modifier, content: @Composable () -> Unit) { internal actual fun ScrollableColumn(modifier: Modifier, content: @Composable () -> Unit) {
val scrollState = rememberScrollState() val scrollState = rememberScrollState()
Modifier.verticalScroll(scrollState) Modifier.verticalScroll(scrollState)

2
experimental/examples/imageviewer/shared/src/iosMain/kotlin/example/imageviewer/view/ScrollableColumn.ios.kt

@ -4,5 +4,5 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
@Composable @Composable
actual fun ScrollableColumn(modifier: Modifier, content: @Composable () -> Unit) = internal actual fun ScrollableColumn(modifier: Modifier, content: @Composable () -> Unit) =
TouchScrollableColumn(modifier, content) TouchScrollableColumn(modifier, content)

Loading…
Cancel
Save