diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt index 6a49c7b39..30e85da87 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/Buttons.kt @@ -116,7 +116,7 @@ private fun CoreButton( Button( modifier = modifier.height(buttonSize.height), colors = buttonColors, - shape = CustomShapes.medium, + shape = CustomShapes.MEDIUM, enabled = isEnabled, onClick = onClick, ) { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FileItem.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FileItem.kt index d30ba4231..68955b157 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FileItem.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FileItem.kt @@ -86,7 +86,7 @@ private fun FileItemContent( onClick = onClick, modifier = Modifier.aspectRatio(164 / 152f), colors = CardDefaults.cardColors(containerColor = SwissTransferTheme.materialColors.background), - shape = CustomShapes.small, + shape = CustomShapes.SMALL, border = BorderStroke(width = 1.dp, SwissTransferTheme.materialColors.outlineVariant) ) { Box( diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SharpRippleButton.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SharpRippleButton.kt index 9687b40be..c38135f6a 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SharpRippleButton.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SharpRippleButton.kt @@ -49,7 +49,7 @@ fun SharpRippleButton( onClick = onClick, ), colors = colors, - shape = CustomShapes.none, + shape = CustomShapes.NONE, onClick = onClick, content = content, contentPadding = PaddingValues(0.dp), diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SmallFileItem.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SmallFileItem.kt index 869b51912..38421c248 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SmallFileItem.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SmallFileItem.kt @@ -58,8 +58,8 @@ fun SmallFileItem( } enum class SmallFileTileSize(val size: Dp, val shape: Shape) { - SMALL(48.dp, CustomShapes.small), - LARGE(80.dp, CustomShapes.medium); + SMALL(48.dp, CustomShapes.SMALL), + LARGE(80.dp, CustomShapes.MEDIUM); fun iconCircleSize(): Dp = 2f / 3 * size } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferCard.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferCard.kt index 771058c08..8055386d1 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferCard.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferCard.kt @@ -38,7 +38,7 @@ import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme fun SwissTransferCard(modifier: Modifier = Modifier, content: @Composable ColumnScope.() -> Unit) { Card( modifier = modifier, - shape = CustomShapes.medium, + shape = CustomShapes.MEDIUM, colors = CardDefaults.cardColors(contentColor = SwissTransferTheme.colors.secondaryTextColor), content = content, ) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferFab.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferFab.kt index 810e1d3a9..d68746151 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferFab.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferFab.kt @@ -62,8 +62,8 @@ fun SwissTransferFab( } enum class FabType(val shape: CornerBasedShape, val customSize: Dp?) { - NORMAL(CustomShapes.medium, null), - BIG(CustomShapes.large, 80.dp), + NORMAL(CustomShapes.MEDIUM, null), + BIG(CustomShapes.LARGE, 80.dp), } @Preview(name = "Light mode") diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/ImportedFilesCard.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/ImportedFilesCard.kt index c5b889114..d2d5a5645 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/ImportedFilesCard.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/ImportedFilesCard.kt @@ -111,7 +111,7 @@ fun ImportedFilesCard( private fun AddNewFileButton(modifier: Modifier = Modifier, onClick: () -> Unit) { Button( modifier = modifier.size(80.dp), - shape = CustomShapes.medium, + shape = CustomShapes.MEDIUM, colors = ButtonDefaults.buttonColors( containerColor = SwissTransferTheme.materialColors.surface, contentColor = SwissTransferTheme.materialColors.primary, diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/TransferTypeButton.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/TransferTypeButton.kt index 381e762e2..f1df9d636 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/TransferTypeButton.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/TransferTypeButton.kt @@ -48,8 +48,8 @@ fun TransferTypeButton( modifier = Modifier .padding(Margin.XSmall) .height(Dimens.LargeButtonHeight) - .border(width = 1.dp, color = borderColor, shape = CustomShapes.small), - shape = CustomShapes.small, + .border(width = 1.dp, color = borderColor, shape = CustomShapes.SMALL), + shape = CustomShapes.SMALL, colors = ButtonDefaults.buttonColors(containerColor = Color.Transparent, contentColor = contentColor), onClick = onClick, contentPadding = PaddingValues(Margin.Medium), diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/CustomShapes.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/CustomShapes.kt index fefdb1f18..2093be2fc 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/CustomShapes.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/CustomShapes.kt @@ -21,10 +21,10 @@ import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.ui.unit.dp object CustomShapes { - val none = RoundedCornerShape(0) - val rounded = RoundedCornerShape(50) - val extraSmall = RoundedCornerShape(4.dp) - val small = RoundedCornerShape(8.dp) - val medium = RoundedCornerShape(16.dp) - val large = RoundedCornerShape(24.dp) + val NONE = RoundedCornerShape(0) + val ROUNDED = RoundedCornerShape(50) + val EXTRA_SMALL = RoundedCornerShape(4.dp) + val SMALL = RoundedCornerShape(8.dp) + val MEDIUM = RoundedCornerShape(16.dp) + val LARGE = RoundedCornerShape(24.dp) } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Theme.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Theme.kt index 0c0bedb8b..4beef397a 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Theme.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/theme/Theme.kt @@ -88,9 +88,9 @@ data class CustomColorScheme( ) private val Shapes = Shapes( - extraSmall = CustomShapes.extraSmall, - small = CustomShapes.small, - medium = CustomShapes.medium, - large = CustomShapes.large, + extraSmall = CustomShapes.EXTRA_SMALL, + small = CustomShapes.SMALL, + medium = CustomShapes.MEDIUM, + large = CustomShapes.LARGE, // extraLarge: uses default values, for the bottom sheet corners )