Skip to content

Commit

Permalink
Tweak defaults for squiggles
Browse files Browse the repository at this point in the history
  • Loading branch information
saket committed Dec 23, 2023
1 parent 760d314 commit f2b60f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/src/main/kotlin/me/saket/squiggles/SquigglySlider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ fun SquigglySlider(
colors = colors,
enabled = enabled,
thumbSize = DpSize(
width = squigglesSpec.strokeWidth.coerceAtLeast(2.dp),
height = (squigglesSpec.strokeWidth * 4).coerceAtLeast(12.dp),
width = squigglesSpec.strokeWidth.coerceAtLeast(4.dp),
height = (squigglesSpec.strokeWidth * 4).coerceAtLeast(16.dp),
),
)
},
Expand Down Expand Up @@ -131,8 +131,8 @@ object SquigglySlider {
@Immutable
class SquigglesSpec(
val strokeWidth: Dp = 4.dp,
val wavelength: Dp = strokeWidth * 6,
val amplitude: Dp = strokeWidth / 2,
val wavelength: Dp = (strokeWidth * 6).coerceAtLeast(16.dp),
val amplitude: Dp = (strokeWidth / 2).coerceAtLeast(2.dp),
)

@Stable
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f2b60f3

Please sign in to comment.