diff --git a/bezier/src/main/java/io/channel/bezier/compose/component/loader/BezierLoader.kt b/bezier/src/main/java/io/channel/bezier/compose/component/loader/BezierLoader.kt index f32c5b10..0d17d4f1 100644 --- a/bezier/src/main/java/io/channel/bezier/compose/component/loader/BezierLoader.kt +++ b/bezier/src/main/java/io/channel/bezier/compose/component/loader/BezierLoader.kt @@ -16,6 +16,8 @@ import io.channel.bezier.BezierTheme import io.channel.bezier.compose.component.loader.properties.BezierLoaderSize import io.channel.bezier.compose.component.loader.properties.BezierLoaderVariant +private const val StrokeWidthRatio = 0.12f + @Composable fun BezierLoader( variant: BezierLoaderVariant, @@ -24,7 +26,7 @@ fun BezierLoader( CircularProgressIndicator( modifier = Modifier.size(size.size), color = variant.foregroundColor().color, - strokeWidth = size.strokeWidth, + strokeWidth = size.size * StrokeWidthRatio, backgroundColor = variant.backgroundColor().color, strokeCap = StrokeCap.Round, ) diff --git a/bezier/src/main/java/io/channel/bezier/compose/component/loader/properties/BezierLoaderSize.kt b/bezier/src/main/java/io/channel/bezier/compose/component/loader/properties/BezierLoaderSize.kt index 9a185362..5dc2facb 100644 --- a/bezier/src/main/java/io/channel/bezier/compose/component/loader/properties/BezierLoaderSize.kt +++ b/bezier/src/main/java/io/channel/bezier/compose/component/loader/properties/BezierLoaderSize.kt @@ -5,14 +5,20 @@ import androidx.compose.ui.unit.dp enum class BezierLoaderSize( internal val size: Dp, - internal val strokeWidth: Dp, ) { + XXSmall( + size = 16.dp, + ), + XSmall( + size = 20.dp, + ), Small( - size = 28.dp, - strokeWidth = 4.dp, + size = 24.dp, ), Medium( + size = 28.dp, + ), + Large( size = 50.dp, - strokeWidth = 6.dp, ), }