diff --git a/examples/codeviewer/common/src/desktopMain/kotlin/org/jetbrains/codeviewer/platform/Scrollbar.kt b/examples/codeviewer/common/src/desktopMain/kotlin/org/jetbrains/codeviewer/platform/Scrollbar.kt index 5c1ae84f13..5bbd7bbffc 100644 --- a/examples/codeviewer/common/src/desktopMain/kotlin/org/jetbrains/codeviewer/platform/Scrollbar.kt +++ b/examples/codeviewer/common/src/desktopMain/kotlin/org/jetbrains/codeviewer/platform/Scrollbar.kt @@ -1,14 +1,11 @@ package org.jetbrains.codeviewer.platform import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.foundation.LazyScrollbarAdapter import androidx.compose.foundation.ScrollState import androidx.compose.foundation.lazy.LazyListState import androidx.compose.foundation.rememberScrollbarAdapter import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember import androidx.compose.ui.Modifier -import androidx.compose.ui.platform.DensityAmbient import androidx.compose.ui.unit.Dp @Composable @@ -29,20 +26,5 @@ actual fun VerticalScrollbar( averageItemSize: Dp ) = androidx.compose.foundation.VerticalScrollbar( modifier, - adapter = rememberScrollbarAdapterFixed(scrollState, itemCount, averageItemSize) -) - -// TODO/migrateToMaster should be fixed in androidx-master-dev -@Composable -fun rememberScrollbarAdapterFixed( - scrollState: LazyListState, - itemCount: Int, - averageItemSize: Dp -): LazyScrollbarAdapter { - val density = DensityAmbient.current - return remember(density, scrollState, itemCount, averageItemSize) { - with(density) { - LazyScrollbarAdapter(scrollState, itemCount, averageItemSize.toPx()) - } - } -} \ No newline at end of file + adapter = rememberScrollbarAdapter(scrollState, itemCount, averageItemSize) +) \ No newline at end of file