Skip to content

Commit 14cf18a

Browse files
committed
rename variable
1 parent ad00d04 commit 14cf18a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

slider/src/main/java/io/monstarlab/mosaic/slider/Slider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public fun Slider(
9999
thumb = thumb,
100100
track = {
101101
SliderTrack(
102-
progress = state.valueAsFraction,
102+
progress = state.offsetAsFraction,
103103
colors = colors,
104104
disabledRange = state.disabledRangeAsFractions,
105105
enabled = enabled,

slider/src/main/java/io/monstarlab/mosaic/slider/SliderLayout.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public fun SliderLayout(
4646
state.updateDimensions(sliderWidth.toFloat(), thumbPlaceable.width.toFloat())
4747

4848
val trackOffsetX = thumbPlaceable.width / 2
49-
val thumbOffsetX = ((trackPlaceable.width) * state.valueAsFraction).roundToInt()
49+
val thumbOffsetX = ((trackPlaceable.width) * state.offsetAsFraction).roundToInt()
5050
val trackOffsetY = (sliderHeight - trackPlaceable.height) / 2
5151
val thumbOffsetY = (sliderHeight - thumbPlaceable.height) / 2
5252

0 commit comments

Comments
 (0)