From a4b343d0f6b2b7d5a88c22e81e4669e0cc4396a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9luchu?= Date: Thu, 17 Aug 2023 00:17:41 +0200 Subject: [PATCH] Fixed icon padding and size from params in IconProgress --- .../ui/composables/progress/IconProgress.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jchucomponents-ui/src/main/kotlin/com/jeluchu/jchucomponents/ui/composables/progress/IconProgress.kt b/jchucomponents-ui/src/main/kotlin/com/jeluchu/jchucomponents/ui/composables/progress/IconProgress.kt index 7a6eefd0..f3eed24c 100644 --- a/jchucomponents-ui/src/main/kotlin/com/jeluchu/jchucomponents/ui/composables/progress/IconProgress.kt +++ b/jchucomponents-ui/src/main/kotlin/com/jeluchu/jchucomponents/ui/composables/progress/IconProgress.kt @@ -80,7 +80,9 @@ fun IconProgress( verticalArrangement = Arrangement.spacedBy(5.dp) ) { androidx.compose.material3.Icon( - modifier = Modifier.size(60.dp), + modifier = Modifier + .size(iconProgressCustom.iconSize) + .padding(iconProgressCustom.iconPadding), imageVector = icon, tint = when { !enabled -> iconProgressCounter.disabledIndicator @@ -169,7 +171,9 @@ fun IconProgress( verticalArrangement = Arrangement.spacedBy(5.dp) ) { Image( - modifier = Modifier.size(iconProgressCustom.iconSize), + modifier = Modifier + .size(iconProgressCustom.iconSize) + .padding(iconProgressCustom.iconPadding), painter = icon, colorFilter = when { !enabled -> iconProgressCounter.disabledIndicator @@ -228,6 +232,7 @@ fun IconProgress( @Immutable class IconProgressCustom constructor( val iconSize: Dp = 50.dp, + val iconPadding: Dp = 10.dp, val container: Color = Color.Gray, val content: Color = Color.LightGray.copy(alpha = 0.3f), val disabledIndicator: Color = Color(0xFF35898f),