Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ import kotlinx.coroutines.delay
*/
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.
* Its thumb disappears when the scrolling container is dormant.
Expand Down Expand Up @@ -136,8 +141,8 @@ private fun ScrollableState.DraggableScrollbarThumb(
modifier = Modifier
.run {
when (orientation) {
Vertical -> width(12.dp).fillMaxHeight()
Horizontal -> height(12.dp).fillMaxWidth()
Vertical -> width(THUMB_SIZE.dp).fillMaxHeight()
Horizontal -> height(THUMB_SIZE.dp).fillMaxWidth()
}
}
.scrollThumb(this, interactionSource),
Expand Down