From 10347d0a855238b091688ab358f7bcd7e024da51 Mon Sep 17 00:00:00 2001 From: dean Date: Thu, 8 Aug 2024 10:37:39 +0900 Subject: [PATCH] =?UTF-8?q?Size=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../compose/component/loader/BezierLoader.kt | 4 +++- .../loader/properties/BezierLoaderSize.kt | 14 ++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) 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, ), }