Skip to content

Commit

Permalink
fix: Use Dimens instead of Margin for icons size
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Nov 19, 2024
1 parent 17c9b02 commit 2d0e809
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import androidx.compose.ui.unit.dp
import com.infomaniak.swisstransfer.R
import com.infomaniak.swisstransfer.ui.images.AppImages.AppIcons
import com.infomaniak.swisstransfer.ui.images.icons.Camera
import com.infomaniak.swisstransfer.ui.theme.Dimens
import com.infomaniak.swisstransfer.ui.theme.Margin
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme
import com.infomaniak.swisstransfer.ui.utils.PreviewLightAndDark
Expand All @@ -53,7 +54,7 @@ fun BottomSheetItem(imageVector: ImageVector, @StringRes titleRes: Int, onClick:
verticalAlignment = Alignment.CenterVertically,
) {
Icon(
modifier = Modifier.size(Margin.Large),
modifier = Modifier.size(Dimens.IconSize),
imageVector = imageVector,
contentDescription = null,
tint = SwissTransferTheme.materialColors.primary,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fun KeepButtonSize(imageVector: ImageVector?, titleRes: Int, content: @Composabl
@Composable
private fun ButtonTextContent(imageVector: ImageVector?, titleRes: Int) {
imageVector?.let {
Icon(modifier = Modifier.size(Margin.Medium), imageVector = it, contentDescription = null)
Icon(modifier = Modifier.size(Dimens.SmallIconSize), imageVector = it, contentDescription = null)
Spacer(modifier = Modifier.width(Margin.Mini))
}
Text(text = stringResource(id = titleRes), style = SwissTransferTheme.typography.bodyMedium)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fun TransferItem(
Icon(
imageVector = AppIcons.ChevronRightThick,
contentDescription = null,
modifier = Modifier.size(Margin.Medium),
modifier = Modifier.size(Dimens.SmallIconSize),
tint = SwissTransferTheme.colors.iconColor,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import com.infomaniak.swisstransfer.ui.images.icons.ArrowDownFile
import com.infomaniak.swisstransfer.ui.images.icons.Clock
import com.infomaniak.swisstransfer.ui.images.icons.FileZip
import com.infomaniak.swisstransfer.ui.previewparameter.TransferUiListPreviewParameter
import com.infomaniak.swisstransfer.ui.theme.Dimens
import com.infomaniak.swisstransfer.ui.theme.Margin
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme
import com.infomaniak.swisstransfer.ui.utils.PreviewLightAndDark
Expand Down Expand Up @@ -85,7 +86,7 @@ fun TransferInfo(transfer: TransferUi) {
private fun IconText(icon: ImageVector, text: String) {
Row(verticalAlignment = Alignment.CenterVertically) {
Icon(
modifier = Modifier.size(Margin.Medium),
modifier = Modifier.size(Dimens.SmallIconSize),
imageVector = icon,
tint = SwissTransferTheme.materialColors.primary,
contentDescription = null,
Expand Down

0 comments on commit 2d0e809

Please sign in to comment.