Skip to content

Commit

Permalink
review: Rename some icons
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Oct 23, 2024
1 parent 83bbff1 commit 3718e09
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,25 @@ import com.infomaniak.swisstransfer.ui.images.AppImages.AppIcons
import androidx.compose.ui.graphics.StrokeCap.Companion.Round as strokeCapRound
import androidx.compose.ui.graphics.StrokeJoin.Companion.Round as strokeJoinRound

val AppIcons.Copy: ImageVector
val AppIcons.DocumentOnDocument: ImageVector
get() {

if (_copy != null) return _copy!!
if (_documentOnDocument != null) return _documentOnDocument!!

_copy = Builder(
name = "Copy",
_documentOnDocument = Builder(
name = "DocumentOnDocument",
defaultWidth = 24.0.dp,
defaultHeight = 24.0.dp,
viewportWidth = 24.0f,
viewportHeight = 24.0f,
).apply {
path(
fill = SolidColor(Color(0x00000000)), stroke = SolidColor(Color(0xFF9f9f9f)),
strokeLineWidth = 1.5f, strokeLineCap = strokeCapRound, strokeLineJoin =
strokeJoinRound, strokeLineMiter = 4.0f, pathFillType = NonZero
stroke = SolidColor(Color(0xFF9f9f9f)),
strokeLineWidth = 1.5f,
strokeLineCap = strokeCapRound,
strokeLineJoin = strokeJoinRound,
strokeLineMiter = 4.0f,
pathFillType = NonZero,
) {
moveTo(7.5f, 6.75f)
lineTo(7.5f, 2.25f)
Expand All @@ -49,9 +52,12 @@ val AppIcons.Copy: ImageVector
lineTo(16.5f, 17.25f)
}
path(
fill = SolidColor(Color(0x00000000)), stroke = SolidColor(Color(0xFF9f9f9f)),
strokeLineWidth = 1.5f, strokeLineCap = strokeCapRound, strokeLineJoin =
strokeJoinRound, strokeLineMiter = 4.0f, pathFillType = NonZero
stroke = SolidColor(Color(0xFF9f9f9f)),
strokeLineWidth = 1.5f,
strokeLineCap = strokeCapRound,
strokeLineJoin = strokeJoinRound,
strokeLineMiter = 4.0f,
pathFillType = NonZero,
) {
moveTo(16.5f, 21.75f)
curveTo(16.5f, 22.148f, 16.342f, 22.529f, 16.061f, 22.811f)
Expand All @@ -71,17 +77,17 @@ val AppIcons.Copy: ImageVector
}
}.build()

return _copy!!
return _documentOnDocument!!
}

private var _copy: ImageVector? = null
private var _documentOnDocument: ImageVector? = null

@Preview
@Composable
private fun Preview() {
Box {
Image(
imageVector = AppIcons.Copy,
imageVector = AppIcons.DocumentOnDocument,
contentDescription = null,
modifier = Modifier.size(AppImages.previewSize),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,25 @@ import com.infomaniak.swisstransfer.ui.images.AppImages.AppIcons
import androidx.compose.ui.graphics.StrokeCap.Companion.Round as strokeCapRound
import androidx.compose.ui.graphics.StrokeJoin.Companion.Round as strokeJoinRound

val AppIcons.Share: ImageVector
val AppIcons.PersonBadgeShare: ImageVector
get() {

if (_share != null) return _share!!
if (_personBadgeShare != null) return _personBadgeShare!!

_share = Builder(
name = "Share",
_personBadgeShare = Builder(
name = "PersonBadgeShare",
defaultWidth = 24.0.dp,
defaultHeight = 24.0.dp,
viewportWidth = 24.0f,
viewportHeight = 24.0f,
).apply {
path(
fill = SolidColor(Color(0xFF9f9f9f)), stroke = SolidColor(Color(0x00000000)),
strokeLineWidth = 0.0f, strokeLineCap = Butt, strokeLineJoin = Miter,
strokeLineMiter = 4.0f, pathFillType = EvenOdd
fill = SolidColor(Color(0xFF9f9f9f)),
strokeLineWidth = 0.0f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = EvenOdd,
) {
moveTo(19.644f, 16.175f)
curveTo(19.673f, 16.206f, 19.702f, 16.237f, 19.732f, 16.268f)
Expand Down Expand Up @@ -72,9 +75,12 @@ val AppIcons.Share: ImageVector
close()
}
path(
fill = SolidColor(Color(0x00000000)), stroke = SolidColor(Color(0xFF9f9f9f)),
strokeLineWidth = 1.5f, strokeLineCap = strokeCapRound, strokeLineJoin =
strokeJoinRound, strokeLineMiter = 4.0f, pathFillType = NonZero
stroke = SolidColor(Color(0xFF9f9f9f)),
strokeLineWidth = 1.5f,
strokeLineCap = strokeCapRound,
strokeLineJoin = strokeJoinRound,
strokeLineMiter = 4.0f,
pathFillType = NonZero,
) {
moveTo(9.983f, 19.75f)
lineTo(0.75f, 19.75f)
Expand All @@ -94,17 +100,17 @@ val AppIcons.Share: ImageVector
}
}.build()

return _share!!
return _personBadgeShare!!
}

private var _share: ImageVector? = null
private var _personBadgeShare: ImageVector? = null

@Preview
@Composable
private fun Preview() {
Box {
Image(
imageVector = AppIcons.Share,
imageVector = AppIcons.PersonBadgeShare,
contentDescription = null,
modifier = Modifier.size(AppImages.previewSize),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import com.infomaniak.swisstransfer.R
import com.infomaniak.swisstransfer.ui.components.*
import com.infomaniak.swisstransfer.ui.images.AppImages.AppIcons
import com.infomaniak.swisstransfer.ui.images.AppImages.AppIllus
import com.infomaniak.swisstransfer.ui.images.icons.Copy
import com.infomaniak.swisstransfer.ui.images.icons.Share
import com.infomaniak.swisstransfer.ui.images.icons.DocumentOnDocument
import com.infomaniak.swisstransfer.ui.images.icons.PersonBadgeShare
import com.infomaniak.swisstransfer.ui.images.illus.uploadSuccessQr.UploadSuccessQr
import com.infomaniak.swisstransfer.ui.screen.newtransfer.importfiles.components.TransferType
import com.infomaniak.swisstransfer.ui.theme.Dimens
Expand All @@ -50,7 +50,7 @@ fun UploadSuccessQrScreen(transferType: TransferType) {
modifier = it,
style = ButtonType.PRIMARY,
titleRes = R.string.buttonShare,
imageVector = AppIcons.Share,
imageVector = AppIcons.PersonBadgeShare,
onClick = { /* TODO */ },
)
},
Expand Down Expand Up @@ -117,7 +117,7 @@ private fun Content(transferType: TransferType) {
modifier = Modifier.padding(Margin.Medium),
style = ButtonType.SECONDARY,
titleRes = R.string.buttonCopyLink,
imageVector = AppIcons.Copy,
imageVector = AppIcons.DocumentOnDocument,
onClick = { /* TODO */ },
)
}
Expand Down

0 comments on commit 3718e09

Please sign in to comment.