Skip to content

Commit

Permalink
Add some minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mahozad committed Jul 10, 2024
1 parent 653a09e commit 5ae08d3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,15 @@ internal inline fun lerp(start: Float, stop: Float, fraction: Float) =
internal inline fun calcFraction(a: Float, b: Float, pos: Float) =
(if (b - a == 0f) 0f else (pos - a) / (b - a)).coerceIn(0f, 1f)










/*
For links to source code of the original squiggly progress in Android OS, see the main README file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,11 +502,11 @@ class VisualTest {
showRegularSliders = false,
) { value, onChange ->
var waveThickness by remember { mutableStateOf(4.dp) }
Slider3(value, onChange)
WavySlider3(value, onChange, waveVelocity = 10.dp to HEAD, waveThickness = waveThickness, waveHeight = 0.dp)
Button(onClick = { waveThickness = if (waveThickness == 4.dp) 16.dp else 4.dp }) {
Text(text = "Toggle wave thickness")
}
Slider3(value, onChange)
WavySlider3(value, onChange, waveVelocity = 10.dp to HEAD, waveThickness = waveThickness, waveHeight = 0.dp)
}
assert(isPassed)
}
Expand Down

0 comments on commit 5ae08d3

Please sign in to comment.