Skip to content

Commit

Permalink
Previous commits
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Nov 18, 2024
1 parent cd38af3 commit c550783
Show file tree
Hide file tree
Showing 33 changed files with 78 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@ internal val FileTypeIcons.Archive: ImageVector
).apply {
path(
fill = SolidColor(Color(0xFF9F9F9F)),
stroke = null,
strokeLineWidth = 0.0f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero
pathFillType = NonZero,
) {
moveTo(9.75f, 15.25f)
arcToRelative(0.375f, 0.375f, 0.0f, false, true, 0.0f, -0.75f)
Expand Down Expand Up @@ -101,12 +96,7 @@ internal val FileTypeIcons.Archive: ImageVector
}
path(
fill = SolidColor(Color(0xFF9F9F9F)),
stroke = null,
strokeLineWidth = 0.0f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero
pathFillType = NonZero,
) {
moveTo(11.726f, 4.807f)
arcToRelative(1.95f, 1.95f, 0.0f, false, true, -0.474f, 1.533f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,7 @@ internal val FileTypeIcons.Points: ImageVector
}
path(
fill = SolidColor(Color(0xFF9F9F9F)),
stroke = null,
strokeLineWidth = 0.0f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero
pathFillType = NonZero,
) {
moveTo(13.0f, 5.007f)
verticalLineToRelative(6.0f)
Expand All @@ -69,12 +64,7 @@ internal val FileTypeIcons.Points: ImageVector
}
path(
fill = SolidColor(Color(0xFF9F9F9F)),
stroke = null,
strokeLineWidth = 0.0f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero
pathFillType = NonZero,
) {
moveTo(11.0f, 7.007f)
arcToRelative(6.0f, 6.0f, 0.0f, true, false, 6.0f, 6.0f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,7 @@ internal val FileTypeIcons.Video: ImageVector
}
path(
fill = SolidColor(Color(0xFF9F9F9F)),
stroke = null,
strokeLineWidth = 0.0f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero
pathFillType = NonZero,
) {
moveTo(9.488f, 15.667f)
arcTo(0.856f, 0.856f, 0.0f, false, true, 8.25f, 14.9f)
Expand Down
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,12 +54,12 @@ 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,
)
Spacer(modifier = Modifier.width(Margin.Large))
Spacer(Modifier.width(Margin.Large))
Text(
text = stringResource(id = titleRes),
style = SwissTransferTheme.typography.bodyRegular,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ fun BrandTopAppBar() {
title = {
Row(verticalAlignment = Alignment.CenterVertically) {
Image(imageVector = AppIllus.LogoInfomaniak, contentDescription = null)
Spacer(modifier = Modifier.width(Margin.Medium))
Spacer(Modifier.width(Margin.Medium))
VerticalDivider(modifier = Modifier.height(Margin.Large), color = SwissTransferTheme.colors.toolbarTextColor)
Spacer(modifier = Modifier.width(Margin.Medium))
Spacer(Modifier.width(Margin.Medium))
Image(imageVector = AppIllus.LogoSwissTransfer, contentDescription = null)
Spacer(modifier = Modifier.width(Margin.Mini))
Spacer(Modifier.width(Margin.Mini))
Text(text = stringResource(id = R.string.appName), color = SwissTransferTheme.colors.toolbarTextColor)
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ 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)
Spacer(modifier = Modifier.width(Margin.Mini))
Icon(modifier = Modifier.size(Dimens.SmallIconSize), imageVector = it, contentDescription = null)
Spacer(Modifier.width(Margin.Mini))
}
Text(text = stringResource(id = titleRes), style = SwissTransferTheme.typography.bodyMedium)
}
Expand Down Expand Up @@ -208,7 +208,7 @@ private fun LargeButtonPreview() {
ButtonType.entries.forEach {
Row {
LargeButton(titleRes = R.string.appName, style = it, onClick = {}, imageVector = AppIcons.Add)
Spacer(modifier = Modifier.width(Margin.Mini))
Spacer(Modifier.width(Margin.Mini))
LargeButton(
titleRes = R.string.appName,
style = it,
Expand All @@ -217,10 +217,10 @@ private fun LargeButtonPreview() {
imageVector = AppIcons.Add
)

Spacer(modifier = Modifier.width(Margin.Mini))
Spacer(Modifier.width(Margin.Mini))

SmallButton(titleRes = R.string.appName, style = it, imageVector = AppIcons.Add, onClick = {})
Spacer(modifier = Modifier.width(Margin.Mini))
Spacer(Modifier.width(Margin.Mini))
SmallButton(
titleRes = R.string.appName,
style = it,
Expand All @@ -229,7 +229,7 @@ private fun LargeButtonPreview() {
onClick = {}
)
}
Spacer(modifier = Modifier.height(Margin.Medium))
Spacer(Modifier.height(Margin.Medium))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private fun VerticallyStackedButtons(
.padding(horizontal = Margin.Medium),
)

Spacer(modifier = Modifier.height(Margin.Medium))
Spacer(Modifier.height(Margin.Medium))

bottomButton(
Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private fun FileItemPreview(@PreviewParameter(FileUiListPreviewParameter::class)
onRemove = {},
)

Spacer(modifier = Modifier.height(Margin.Medium))
Spacer(Modifier.height(Margin.Medium))

val imageFile = files[1]
FileItem(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ private fun NewTransferFabPreview() {
Surface {
Row {
NewTransferFab(newTransferFabType = NewTransferFabType.BOTTOM_BAR)
Spacer(modifier = Modifier.width(Margin.Large))
Spacer(Modifier.width(Margin.Large))
NewTransferFab(newTransferFabType = NewTransferFabType.EMPTY_STATE)
Spacer(modifier = Modifier.width(Margin.Large))
Spacer(Modifier.width(Margin.Large))
NewTransferFab(newTransferFabType = NewTransferFabType.NAVIGATION_RAIL)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private fun SmallFileItemPreview(@PreviewParameter(FileUiListPreviewParameter::c
onRemove = {}
)

Spacer(modifier = Modifier.height(Margin.Medium))
Spacer(Modifier.height(Margin.Medium))

SmallFileItem(
file = file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private fun BottomSheetContent(

imageVector?.let {
Image(modifier = paddedModifier, imageVector = imageVector, contentDescription = null)
Spacer(modifier = Modifier.height(Margin.Large))
Spacer(Modifier.height(Margin.Large))
}

title?.let {
Expand All @@ -114,7 +114,7 @@ private fun BottomSheetContent(
color = SwissTransferTheme.colors.primaryTextColor,
textAlign = TextAlign.Center,
)
Spacer(modifier = Modifier.height(Margin.Large))
Spacer(Modifier.height(Margin.Large))
}

description?.let {
Expand All @@ -125,12 +125,12 @@ private fun BottomSheetContent(
color = SwissTransferTheme.colors.secondaryTextColor,
textAlign = TextAlign.Center,
)
Spacer(modifier = Modifier.height(Margin.Large))
Spacer(Modifier.height(Margin.Large))
}

content?.let {
it()
Spacer(modifier = Modifier.height(Margin.Large))
Spacer(Modifier.height(Margin.Large))
}

DoubleButtonCombo(topButton = topButton, bottomButton = bottomButton)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private fun SwissTransferFabPreview() {
SwissTransferTheme {
Row {
SwissTransferFab(onClick = {})
Spacer(modifier = Modifier.width(Margin.Large))
Spacer(Modifier.width(Margin.Large))
SwissTransferFab(fabType = FabType.BIG, onClick = {})
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ fun TransferItem(
overflow = TextOverflow.MiddleEllipsis,
)

Spacer(modifier = Modifier.height(Margin.Mini))
Spacer(Modifier.height(Margin.Mini))
TextDotText(
firstText = { uploadedSize },
secondText = { expiryText },
optionalSecondTextColor = expiryColor,
)

Spacer(modifier = Modifier.height(Margin.Mini))
Spacer(Modifier.height(Margin.Mini))
ContextualFlowRow(
itemCount = files.count(),
maxLines = 1,
Expand All @@ -105,11 +105,11 @@ fun TransferItem(
}
}

Spacer(modifier = Modifier.width(Margin.Medium))
Spacer(Modifier.width(Margin.Medium))
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 @@ -51,11 +51,6 @@ val AppIcons.CircleBlackAndWhite: ImageVector
).apply {
path(
fill = SolidColor(Color(0xFF000000)),
stroke = null,
strokeLineWidth = 0.0f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero,
) {
moveTo(12.0f, 0.0f)
Expand All @@ -75,11 +70,6 @@ val AppIcons.CircleBlackAndWhite: ImageVector
}) {
path(
fill = SolidColor(Color(0xFFF5F5F5)),
stroke = null,
strokeLineWidth = 0.0f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero,
) {
moveTo(-4.5f, 27.5f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ val AppIcons.EyeCrossed: ImageVector
).apply {
path(
fill = SolidColor(Color(0xFF9F9F9F)),
stroke = null,
strokeLineWidth = 0.0f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero,
) {
moveTo(14.715f, 1.154f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ fun SentEmptyScreen() {
style = SwissTransferTheme.typography.specificMedium32,
textAlign = TextAlign.Center,
)
Spacer(modifier = Modifier.height(Margin.Medium))
Spacer(Modifier.height(Margin.Medium))
Text(
modifier = Modifier.widthIn(max = maxWidth),
text = stringResource(id = R.string.firstTransferDescription),
style = SwissTransferTheme.typography.bodyRegular,
color = SwissTransferTheme.colors.secondaryTextColor,
)
Spacer(modifier = Modifier.height(Margin.Medium))
Spacer(Modifier.height(Margin.Medium))
ConstraintLayout {
val (icon, fab) = createRefs()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private fun SettingItemContent(
} else {
Image(imageVector = it, contentDescription = null)
}
Spacer(modifier = Modifier.width(Margin.Medium))
Spacer(Modifier.width(Margin.Medium))
}

Column(modifier = Modifier.weight(1.0f)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ private fun SettingOptionItem(item: SettingOption, isSelected: Boolean, onClick:
) {
item.icon?.let {
Image(imageVector = it, contentDescription = null)
Spacer(modifier = Modifier.width(Margin.Medium))
Spacer(Modifier.width(Margin.Medium))
} ?: run {
// Make sure the items with no icons have the same height as the ones with icons
Spacer(modifier = Modifier.height(Margin.Large))
Spacer(Modifier.height(Margin.Large))
}

Text(text = item.title(), Modifier.weight(1.0f), style = SwissTransferTheme.typography.bodyRegular)

if (isSelected) Spacer(modifier = Modifier.width(Margin.Medium))
if (isSelected) Spacer(Modifier.width(Margin.Medium))
AnimatedVisibility(
visible = isSelected,
enter = scaleIn(),
Expand Down
Loading

0 comments on commit c550783

Please sign in to comment.