From f713b1a58fe670ec2914b5fb36f7a70a14b9c17f Mon Sep 17 00:00:00 2001 From: Chris Banes Date: Thu, 17 Oct 2024 21:35:34 +0100 Subject: [PATCH] Reduce step size to 60.dp --- .../commonMain/kotlin/dev/chrisbanes/haze/HazeChildNode.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/haze/src/commonMain/kotlin/dev/chrisbanes/haze/HazeChildNode.kt b/haze/src/commonMain/kotlin/dev/chrisbanes/haze/HazeChildNode.kt index a8c795fc..f226e34d 100644 --- a/haze/src/commonMain/kotlin/dev/chrisbanes/haze/HazeChildNode.kt +++ b/haze/src/commonMain/kotlin/dev/chrisbanes/haze/HazeChildNode.kt @@ -360,9 +360,9 @@ class HazeChildNode( var steps = progressive.steps if (steps == HazeProgressive.STEPS_AUTO_BALANCED) { // Here we're going to calculate an appropriate amount of steps for the length. - // We use a calculation of 48dp per step, which is a good balance between + // We use a calculation of 60dp per step, which is a good balance between // quality vs performance - val stepHeightPx = with(drawContext.density) { 48.dp.toPx() } + val stepHeightPx = 60.dp.toPx() val length = calculateLength(progressive.start, progressive.end, size) steps = ceil(length / stepHeightPx).toInt().coerceAtLeast(2) } @@ -420,8 +420,6 @@ class HazeChildNode( ) layer.alpha = alpha - // Since we included a border around the content, we need to translate so that - // we don't see it (but it still affects the RenderEffect) drawLayer(layer) graphicsContext.releaseGraphicsLayer(layer)