Align fast scroll indicator with thumb top

This commit is contained in:
Alexander Capehart
2025-11-04 10:09:21 -07:00
parent 1a2ea90d7e
commit 9a3e2f602e
@@ -305,10 +305,9 @@ constructor(context: Context, attrs: AttributeSet? = null, @AttrRes defStyleAttr
}
val popupAnchorY = popupHeight / 2
val thumbAnchorY = thumbView.height / 2
val popupTop =
(thumbTop + thumbAnchorY - popupAnchorY)
(thumbTop - popupAnchorY)
.coerceAtLeast(thumbPadding.top + popupLayoutParams.topMargin)
.coerceAtMost(
height - thumbPadding.bottom - popupLayoutParams.bottomMargin - popupHeight)