Abel Serrano Juste 2 weeks ago committed by GitHub
commit 9bab5bea6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -65,6 +65,11 @@ import kotlinx.coroutines.delay
*/ */
private const val SCROLLBAR_INACTIVE_TO_DORMANT_TIME_IN_MS = 2_000L private const val SCROLLBAR_INACTIVE_TO_DORMANT_TIME_IN_MS = 2_000L
/**
* The size of the scrollbar thumb
*/
private const val THUMB_SIZE = 12
/** /**
* A [Scrollbar] that allows for fast scrolling of content by dragging its thumb. * A [Scrollbar] that allows for fast scrolling of content by dragging its thumb.
* Its thumb disappears when the scrolling container is dormant. * Its thumb disappears when the scrolling container is dormant.
@ -136,8 +141,8 @@ private fun ScrollableState.DraggableScrollbarThumb(
modifier = Modifier modifier = Modifier
.run { .run {
when (orientation) { when (orientation) {
Vertical -> width(12.dp).fillMaxHeight() Vertical -> width(THUMB_SIZE.dp).fillMaxHeight()
Horizontal -> height(12.dp).fillMaxWidth() Horizontal -> height(THUMB_SIZE.dp).fillMaxWidth()
} }
} }
.scrollThumb(this, interactionSource), .scrollThumb(this, interactionSource),

Loading…
Cancel
Save