diff --git a/app/src/main/kotlin/com/tutpro/baresip/CustomElements.kt b/app/src/main/kotlin/com/tutpro/baresip/CustomElements.kt index ee5369d4..bba968c9 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/CustomElements.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/CustomElements.kt @@ -235,11 +235,11 @@ object CustomElements { val contentHeight = state.maxValue + viewHeight val scrollbarHeight = (viewHeight * (viewHeight / contentHeight )).coerceIn(10.dp.toPx() .. viewHeight) val variableZone = viewHeight - scrollbarHeight - val scrollbarYoffset = (state.value.toFloat() / state.maxValue) * variableZone + val scrollbarOffsetY = (state.value.toFloat() / state.maxValue) * variableZone drawRoundRect( cornerRadius = CornerRadius(scrollbarWidth.toPx() / 2, scrollbarWidth.toPx() / 2), color = color, - topLeft = Offset(this.size.width - scrollbarWidth.toPx(), scrollbarYoffset), + topLeft = Offset(this.size.width - scrollbarWidth.toPx(), scrollbarOffsetY), size = Size(scrollbarWidth.toPx(), scrollbarHeight), alpha = alpha )