mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 00:35:26 +02:00
Fix UnittoSlider
Now taking into account cases when range doesn't start from 0
This commit is contained in:
parent
02e9bfaf90
commit
adb551dc62
@ -105,8 +105,8 @@ private fun SquigglyTrack(
|
||||
val height = size.height
|
||||
val initialOffset = strokeWidth / 2
|
||||
val thumbPosition = width
|
||||
.times(sliderState.value)
|
||||
.div(sliderState.valueRange.endInclusive)
|
||||
.times(sliderState.value - sliderState.valueRange.start)
|
||||
.div(sliderState.valueRange.endInclusive - sliderState.valueRange.start)
|
||||
.minus(initialOffset)
|
||||
|
||||
val path = Path().apply {
|
||||
|
Loading…
x
Reference in New Issue
Block a user