diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/EmailAddressChip.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/EmailAddressChip.kt index e2334b4a08..18d757b9be 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/EmailAddressChip.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/EmailAddressChip.kt @@ -39,9 +39,9 @@ fun EmailAddressChip( label = { Text( text = text, + style = SwissTransferTheme.typography.bodyRegular, maxLines = 1, overflow = TextOverflow.MiddleEllipsis, - style = SwissTransferTheme.typography.bodyRegular, ) }, modifier = modifier, diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FilePreview.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FilePreview.kt index ab50058a6e..606e9c6212 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FilePreview.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/FilePreview.kt @@ -110,12 +110,12 @@ private fun FileIcon( if (showFileName) { Text( - fileName, - modifier = Modifier.align(Alignment.BottomCenter), + text = fileName, style = SwissTransferTheme.typography.labelRegular, color = SwissTransferTheme.colors.secondaryTextColor, - overflow = TextOverflow.Ellipsis, maxLines = 1, + overflow = TextOverflow.Ellipsis, + modifier = Modifier.align(Alignment.BottomCenter), ) } } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/HighlightedText.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/HighlightedText.kt index e8138c6cad..c0667840d5 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/HighlightedText.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/HighlightedText.kt @@ -178,7 +178,7 @@ private fun Preview() { HighlightedText( templateRes = R.string.uploadProgressTitleTemplate, argumentRes = R.string.uploadProgressTitleArgument, - style = SwissTransferTheme.typography.bodyMedium + style = SwissTransferTheme.typography.bodyMedium, ) } } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferBottomSheet.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferBottomSheet.kt index f597e31c39..3413bd4191 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferBottomSheet.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferBottomSheet.kt @@ -108,22 +108,22 @@ private fun BottomSheetContent( title?.let { Text( - modifier = paddedModifier, text = it, + textAlign = TextAlign.Center, style = SwissTransferTheme.typography.bodyMedium, color = SwissTransferTheme.colors.primaryTextColor, - textAlign = TextAlign.Center, + modifier = paddedModifier, ) Spacer(modifier = Modifier.height(Margin.Large)) } description?.let { Text( - modifier = paddedModifier, text = it, + textAlign = TextAlign.Center, style = SwissTransferTheme.typography.bodyRegular, color = SwissTransferTheme.colors.secondaryTextColor, - textAlign = TextAlign.Center, + modifier = paddedModifier, ) Spacer(modifier = Modifier.height(Margin.Large)) } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTextField.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTextField.kt index 9dc1e8f3a6..b796281951 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTextField.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTextField.kt @@ -96,7 +96,7 @@ fun SwissTransferTextField( readOnly = isReadOnly, enabled = !isReadOnly, value = text, - label = displayLabel?.let { { Text(text = it) } }, + label = displayLabel?.let { { Text(it) } }, minLines = minLineNumber, maxLines = maxLineNumber, colors = textFieldColors, diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt index 83dd38a940..567ef6d387 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/SwissTransferTopAppBar.kt @@ -55,7 +55,7 @@ fun SwissTransferTopAppBar( actionIconContentColor = SwissTransferTheme.colors.toolbarIconColor, navigationIconContentColor = SwissTransferTheme.colors.toolbarIconColor, ), - title = { Text(title, style = SwissTransferTheme.typography.h2) }, + title = { Text(text = title, style = SwissTransferTheme.typography.h2) }, navigationIcon = { navigationMenu?.let { MenuButton(navigationMenu) } }, actions = { actionMenus.forEach { actionMenu -> MenuButton(actionMenu) } }, ) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/TextDotText.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/TextDotText.kt index 2988e92560..0aa492c9f1 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/TextDotText.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/TextDotText.kt @@ -38,19 +38,15 @@ fun TextDotText( optionalSecondTextColor: Color? = null, ) { Row(modifier) { - CustomText(firstText, color, style) + CustomText(text = firstText, style = style, color = color) Spacer(Modifier.width(Margin.Mini)) - Text( - text = "•", - color = color, - style = style, - ) + Text(text = "•", style = style, color = color) Spacer(Modifier.width(Margin.Mini)) - CustomText(secondText, optionalSecondTextColor ?: color, style) + CustomText(text = secondText, style = style, color = optionalSecondTextColor ?: color) } } @Composable -private fun CustomText(value: @Composable () -> String, color: Color, style: TextStyle) { - Text(text = value(), color = color, style = style) +private fun CustomText(text: @Composable () -> String, style: TextStyle, color: Color) { + Text(text = text(), style = style, color = color) } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferFilePreview.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferFilePreview.kt index fbeedb957e..ed3e6e5c30 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferFilePreview.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferFilePreview.kt @@ -50,8 +50,8 @@ fun TransferFilePreview(file: FileUi? = null, remainingFilesCount: Int? = null) ) { Text( text = "+$remainingFilesCount", - color = SwissTransferTheme.colors.onTransferFilePreviewOverflow, style = SwissTransferTheme.typography.bodyRegular, + color = SwissTransferTheme.colors.onTransferFilePreviewOverflow, ) } } else { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferItemList.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferItemList.kt index 7401d5a99e..d16879a501 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferItemList.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/transfer/TransferItemList.kt @@ -55,7 +55,7 @@ fun TransferItemList( contentPadding = PaddingValues(top = Margin.Mini), ) { - item { Text(stringResource(titleRes), style = SwissTransferTheme.typography.h1) } + item { Text(text = stringResource(titleRes), style = SwissTransferTheme.typography.h1) } items( count = getTransfers().count(), diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/AppNavigationSuiteScaffold.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/AppNavigationSuiteScaffold.kt index 1fcdcb220f..b933e8caee 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/AppNavigationSuiteScaffold.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/AppNavigationSuiteScaffold.kt @@ -144,5 +144,5 @@ private fun NavigationIcon(isNavigationBar: Boolean, navigationItem: NavigationI @Composable private fun NavigationLabel(navigationItem: NavigationItem) { - Text(stringResource(navigationItem.label)) + Text(text = stringResource(navigationItem.label)) } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentEmptyScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentEmptyScreen.kt index c84446d2cc..2d5b780956 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentEmptyScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/sent/SentEmptyScreen.kt @@ -46,17 +46,17 @@ fun SentEmptyScreen() { ) { val maxWidth = Dimens.DescriptionWidth Text( - modifier = Modifier.widthIn(max = maxWidth), text = stringResource(id = R.string.sentEmptyTitle), - style = SwissTransferTheme.typography.specificMedium32, textAlign = TextAlign.Center, + style = SwissTransferTheme.typography.specificMedium32, + modifier = Modifier.widthIn(max = maxWidth), ) Spacer(modifier = Modifier.height(Margin.Medium)) Text( - modifier = Modifier.widthIn(max = maxWidth), text = stringResource(id = R.string.firstTransferDescription), style = SwissTransferTheme.typography.bodyRegular, color = SwissTransferTheme.colors.secondaryTextColor, + modifier = Modifier.widthIn(max = maxWidth), ) Spacer(modifier = Modifier.height(Margin.Medium)) ConstraintLayout { diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreen.kt index 4145c33f0b..37e9672ece 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/SettingsScreen.kt @@ -67,9 +67,9 @@ fun SettingsScreen( .selectableGroup(), ) { Text( - modifier = Modifier.padding(horizontal = Margin.Medium, vertical = Margin.Large), text = stringResource(R.string.settingsTitle), style = SwissTransferTheme.typography.h1, + modifier = Modifier.padding(horizontal = Margin.Medium, vertical = Margin.Large), ) SettingTitle(R.string.settingsCategoryGeneral) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SingleSelectOptions.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SingleSelectOptions.kt index 9ca7e8ac32..3d5aaad88b 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SingleSelectOptions.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/SingleSelectOptions.kt @@ -73,7 +73,11 @@ private fun SettingOptionItem(item: SettingOption, isSelected: Boolean, onClick: Spacer(modifier = Modifier.height(Margin.Large)) } - Text(text = item.title(), Modifier.weight(1.0f), style = SwissTransferTheme.typography.bodyRegular) + Text( + text = item.title(), + style = SwissTransferTheme.typography.bodyRegular, + modifier = Modifier.weight(1.0f), + ) if (isSelected) Spacer(modifier = Modifier.width(Margin.Medium)) AnimatedVisibility( diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/Titles.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/Titles.kt index c78efbb2f4..b784a692d5 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/Titles.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/settings/components/Titles.kt @@ -50,10 +50,10 @@ fun OptionTitle(@StringRes titleRes: Int) { @Composable private fun UnpaddedTitle(modifier: Modifier, titleRes: Int) { Text( - modifier = modifier, text = stringResource(id = titleRes), style = SwissTransferTheme.typography.bodySmallRegular, color = SwissTransferTheme.colors.secondaryTextColor, + modifier = modifier, ) } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/TransferDetailsScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/TransferDetailsScreen.kt index f9788ed62a..0e945153d5 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/TransferDetailsScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/TransferDetailsScreen.kt @@ -212,9 +212,9 @@ private fun TransferMessage(transferMessage: String) { SwissTransferCard { Text( text = transferMessage, - modifier = Modifier.padding(all = Margin.Large), style = SwissTransferTheme.typography.bodySmallRegular, color = SwissTransferTheme.colors.primaryTextColor, + modifier = Modifier.padding(all = Margin.Large), ) } } @@ -276,7 +276,7 @@ private fun RowScope.BottomBarButton(item: BottomBarItem, onClick: (BottomBarIte ) { Icon(item.icon, null) Spacer(modifier = Modifier.height(Margin.Micro)) - Text(stringResource(item.label)) + Text(text = stringResource(item.label)) } } } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/components/TransferInfo.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/components/TransferInfo.kt index 838002d61e..7993e1d1f5 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/components/TransferInfo.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/components/TransferInfo.kt @@ -91,10 +91,10 @@ private fun IconText(icon: ImageVector, text: String) { contentDescription = null, ) Text( - modifier = Modifier.padding(start = Margin.Mini), text = text, style = SwissTransferTheme.typography.bodySmallRegular, color = SwissTransferTheme.colors.primaryTextColor, + modifier = Modifier.padding(start = Margin.Mini), ) } } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transfers/TransfersScreenWrapper.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transfers/TransfersScreenWrapper.kt index 51675b03e6..3e469ab40d 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transfers/TransfersScreenWrapper.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transfers/TransfersScreenWrapper.kt @@ -97,7 +97,7 @@ private fun DetailPane(navigator: ThreePaneScaffoldNavigator @Composable private fun NoSelectionEmptyState() { Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { - Text("Select an item", color = SwissTransferTheme.colors.secondaryTextColor) + Text(text = "Select an item", color = SwissTransferTheme.colors.secondaryTextColor) } } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ImportFilesScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ImportFilesScreen.kt index c003f8e7ed..df3d6d366a 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ImportFilesScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ImportFilesScreen.kt @@ -317,9 +317,9 @@ private fun SendButton( @Composable private fun ImportFilesTitle(modifier: Modifier = Modifier, @StringRes titleRes: Int) { Text( - modifier = modifier, - style = SwissTransferTheme.typography.bodySmallRegular, text = stringResource(titleRes), + style = SwissTransferTheme.typography.bodySmallRegular, + modifier = modifier, ) } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ValidateUserEmailScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ValidateUserEmailScreen.kt index 8afa4e9e71..e76e13955e 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ValidateUserEmailScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ValidateUserEmailScreen.kt @@ -22,5 +22,5 @@ import androidx.compose.runtime.Composable @Composable fun ValidateUserEmailScreen() { - Text("ValidateUserEmailScreen") + Text(text = "ValidateUserEmailScreen") } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/TransferOptionType.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/TransferOptionType.kt index cd4bb12a64..8037871a7a 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/TransferOptionType.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/components/TransferOptionType.kt @@ -53,8 +53,8 @@ fun TransferOptionType( Spacer(modifier = Modifier.width(Margin.Small)) Text( text = stringResource(transferOptionType.buttonText), - color = SwissTransferTheme.materialColors.primary, style = SwissTransferTheme.typography.bodySmallMedium, + color = SwissTransferTheme.materialColors.primary, ) Spacer(modifier = Modifier.weight(1.0f)) SettingValue(selectedSetting) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/UploadSuccessQrScreen.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/UploadSuccessQrScreen.kt index 927295f82b..c894a0f263 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/UploadSuccessQrScreen.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/UploadSuccessQrScreen.kt @@ -100,8 +100,8 @@ private fun ColumnScope.SuccessMessage(transferType: TransferTypeUi, transferUrl Spacer(Modifier.height(Margin.Huge)) Text( text = stringResource(descriptionRes), - style = SwissTransferTheme.typography.bodyRegular, textAlign = TextAlign.Center, + style = SwissTransferTheme.typography.bodyRegular, color = SwissTransferTheme.colors.secondaryTextColor, modifier = Modifier.widthIn(max = Dimens.DescriptionWidth), ) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/components/AdHeader.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/components/AdHeader.kt index 11cf43cdb1..7404af689c 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/components/AdHeader.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/components/AdHeader.kt @@ -55,9 +55,9 @@ fun ColumnScope.AdHeader(adScreenType: UploadProgressAdType) { Spacer(modifier = Modifier.height(Margin.Huge)) Text( text = adScreenType.description(), - modifier = Modifier.widthIn(max = Dimens.DescriptionWidth), - style = SwissTransferTheme.typography.specificLight18, textAlign = TextAlign.Center, + style = SwissTransferTheme.typography.specificLight18, + modifier = Modifier.widthIn(max = Dimens.DescriptionWidth), ) WeightOneSpacer(minHeight = Margin.Medium) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/components/ShareAndCopyButtons.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/components/ShareAndCopyButtons.kt index 46436d2bdd..ca5d814259 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/components/ShareAndCopyButtons.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload/components/ShareAndCopyButtons.kt @@ -90,7 +90,7 @@ private fun RowScope.ShareCopyButton(icon: ImageVector, @StringRes textRes: Int, ) { Icon(icon, contentDescription = null, modifier = Modifier.size(Dimens.SmallIconSize)) Spacer(modifier = Modifier.height(Margin.Micro)) - Text(stringResource(textRes)) + Text(text = stringResource(textRes)) } } }