Skip to content

Commit

Permalink
fix: Reimport illustrations with correct baked paddings
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarX committed Dec 5, 2024

Verified

This commit was signed with the committer’s verified signature.
LunarX Gibran Chevalley
1 parent 03aada6 commit 6c0cd2c
Showing 10 changed files with 1,366 additions and 1,983 deletions.
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ package com.infomaniak.swisstransfer.ui.images.illus.onboarding

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.runtime.Composable
Original file line number Diff line number Diff line change
@@ -32,21 +32,21 @@ import com.infomaniak.swisstransfer.ui.images.AppImages.AppIllus
import com.infomaniak.swisstransfer.ui.images.ThemedImage
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme

val AppIllus.StorageBoxPile: ThemedImage
get() = _storageBoxPile ?: object : ThemedImage {
override val light = AppIllus.StorageBoxPileLight
override val dark = AppIllus.StorageBoxPileDark
}.also { _storageBoxPile = it }
val AppIllus.StorageCardboardBoxPile: ThemedImage
get() = _storageCardboardBoxPile ?: object : ThemedImage {
override val light = AppIllus.StorageCardboardBoxPileLight
override val dark = AppIllus.StorageCardboardBoxPileDark
}.also { _storageCardboardBoxPile = it }

private var _storageBoxPile: ThemedImage? = null
private var _storageCardboardBoxPile: ThemedImage? = null

@Preview(name = "Light")
@Preview(name = "Dark", uiMode = Configuration.UI_MODE_NIGHT_YES or Configuration.UI_MODE_TYPE_NORMAL)
@Composable
private fun Preview() {
SwissTransferTheme {
Surface {
val imageVector = AppIllus.StorageBoxPile.image()
val imageVector = AppIllus.StorageCardboardBoxPile.image()
Box {
Image(
imageVector = imageVector,

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -32,21 +32,21 @@ import com.infomaniak.swisstransfer.ui.images.AppImages.AppIllus
import com.infomaniak.swisstransfer.ui.images.ThemedImage
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme

val AppIllus.TwoPadlocksIntertwinedStars: ThemedImage
get() = _twoPadlocksIntertwinedStars ?: object : ThemedImage {
override val light = AppIllus.TwoPadlocksIntertwinedStarsLight
override val dark = AppIllus.TwoPadlocksIntertwinedStarsDark
}.also { _twoPadlocksIntertwinedStars = it }
val AppIllus.TwoLocksIntertwinedStars: ThemedImage
get() = _twoLocksIntertwinedStars ?: object : ThemedImage {
override val light = AppIllus.TwoLocksIntertwinedStarsLight
override val dark = AppIllus.TwoLocksIntertwinedStarsDark
}.also { _twoLocksIntertwinedStars = it }

private var _twoPadlocksIntertwinedStars: ThemedImage? = null
private var _twoLocksIntertwinedStars: ThemedImage? = null

@Preview(name = "Light")
@Preview(name = "Dark", uiMode = Configuration.UI_MODE_NIGHT_YES or Configuration.UI_MODE_TYPE_NORMAL)
@Composable
private fun Preview() {
SwissTransferTheme {
Surface {
val imageVector = AppIllus.TwoPadlocksIntertwinedStars.image()
val imageVector = AppIllus.TwoLocksIntertwinedStars.image()
Box {
Image(
imageVector = imageVector,
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Infomaniak SwissTransfer - Android
* Copyright (C) 2024 Infomaniak Network SA
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.infomaniak.swisstransfer.ui.images.illus.onboarding

import androidx.compose.foundation.Image
@@ -20,17 +37,17 @@ import androidx.compose.ui.unit.dp
import com.infomaniak.swisstransfer.ui.images.AppImages
import com.infomaniak.swisstransfer.ui.images.AppImages.AppIllus

val AppIllus.TwoPadlocksIntertwinedStarsDark: ImageVector
val AppIllus.TwoLocksIntertwinedStarsDark: ImageVector
get() {
if (_twoPadlocksIntertwinedStarsDark != null) {
return _twoPadlocksIntertwinedStarsDark!!
if (_twoLocksIntertwinedStarsDark != null) {
return _twoLocksIntertwinedStarsDark!!
}
_twoPadlocksIntertwinedStarsDark = Builder(
name = "TwoPadlocksIntertwinedStarsDark",
defaultWidth = 240.0.dp,
defaultHeight = 192.0.dp,
viewportWidth = 240.0f,
viewportHeight = 192.0f
_twoLocksIntertwinedStarsDark = Builder(
name = "TwoLocksIntertwinedStarsDark",
defaultWidth = 375.0.dp,
defaultHeight = 258.0.dp,
viewportWidth = 375.0f,
viewportHeight = 258.0f
).apply {
path(
fill = SolidColor(Color(0x00000000)),
@@ -41,15 +58,15 @@ val AppIllus.TwoPadlocksIntertwinedStarsDark: ImageVector
strokeLineMiter = 4.0f,
pathFillType = NonZero
) {
moveTo(124.45f, 89.52f)
lineTo(124.45f, 89.52f)
arcTo(27.3f, 27.3f, 56.26f, false, true, 116.99f, 127.39f)
lineTo(90.87f, 144.91f)
arcTo(27.3f, 27.3f, 56.26f, false, true, 53.0f, 137.45f)
lineTo(53.0f, 137.45f)
arcTo(27.3f, 27.3f, 56.26f, false, true, 60.46f, 99.58f)
lineTo(86.58f, 82.06f)
arcTo(27.3f, 27.3f, 56.26f, false, true, 124.45f, 89.52f)
moveTo(194.45f, 121.52f)
lineTo(194.45f, 121.52f)
arcTo(27.3f, 27.3f, 56.26f, false, true, 186.99f, 159.39f)
lineTo(160.87f, 176.91f)
arcTo(27.3f, 27.3f, 56.26f, false, true, 123.0f, 169.45f)
lineTo(123.0f, 169.45f)
arcTo(27.3f, 27.3f, 56.26f, false, true, 130.46f, 131.58f)
lineTo(156.58f, 114.06f)
arcTo(27.3f, 27.3f, 56.26f, false, true, 194.45f, 121.52f)
close()
}
path(
@@ -61,27 +78,22 @@ val AppIllus.TwoPadlocksIntertwinedStarsDark: ImageVector
strokeLineMiter = 4.0f,
pathFillType = NonZero
) {
moveTo(183.29f, 139.5f)
lineTo(183.29f, 139.5f)
arcTo(27.3f, 27.3f, 120.47f, false, true, 145.94f, 149.26f)
lineTo(118.8f, 133.36f)
arcTo(27.3f, 27.3f, 120.47f, false, true, 109.04f, 96.02f)
lineTo(109.04f, 96.02f)
arcTo(27.3f, 27.3f, 120.47f, false, true, 146.39f, 86.26f)
lineTo(173.53f, 102.15f)
arcTo(27.3f, 27.3f, 120.47f, false, true, 183.29f, 139.5f)
moveTo(253.29f, 171.5f)
lineTo(253.29f, 171.5f)
arcTo(27.3f, 27.3f, 120.47f, false, true, 215.94f, 181.26f)
lineTo(188.8f, 165.36f)
arcTo(27.3f, 27.3f, 120.47f, false, true, 179.04f, 128.02f)
lineTo(179.04f, 128.02f)
arcTo(27.3f, 27.3f, 120.47f, false, true, 216.39f, 118.26f)
lineTo(243.53f, 134.15f)
arcTo(27.3f, 27.3f, 120.47f, false, true, 253.29f, 171.5f)
close()
}
path(
fill = SolidColor(Color(0xFF67DD95)),
stroke = null,
strokeLineWidth = 0.0f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero
) {
moveToRelative(117.85f, 121.01f)
moveToRelative(187.85f, 153.01f)
lineToRelative(4.43f, 8.51f)
lineToRelative(-16.53f, 11.3f)
lineToRelative(-5.41f, -8.06f)
@@ -96,13 +108,13 @@ val AppIllus.TwoPadlocksIntertwinedStarsDark: ImageVector
strokeLineMiter = 4.0f,
pathFillType = NonZero
) {
moveTo(55.47f, 87.07f)
moveTo(125.47f, 119.07f)
arcToRelative(7.65f, 7.65f, 0.0f, false, true, 10.61f, 2.09f)
lineToRelative(36.56f, 54.5f)
arcToRelative(7.65f, 7.65f, 0.0f, false, true, -2.09f, 10.61f)
lineToRelative(-48.43f, 32.49f)
arcToRelative(7.65f, 7.65f, 0.0f, false, true, -10.61f, -2.09f)
lineTo(4.95f, 130.17f)
lineToRelative(-36.56f, -54.5f)
arcToRelative(7.65f, 7.65f, 0.0f, false, true, 2.09f, -10.61f)
close()
}
@@ -115,18 +127,21 @@ val AppIllus.TwoPadlocksIntertwinedStarsDark: ImageVector
strokeLineMiter = 4.0f,
pathFillType = NonZero
) {
moveToRelative(49.01f, 135.59f)
moveToRelative(117.45f, 167.59f)
lineToRelative(0.01f, 0.3f)
lineToRelative(-0.26f, 0.15f)
lineToRelative(-5.6f, 3.23f)
arcToRelative(3.32f, 3.32f, 0.0f, false, false, 3.32f, 5.76f)
lineToRelative(5.6f, -3.23f)
lineToRelative(0.26f, -0.15f)
lineToRelative(0.25f, 0.16f)
arcToRelative(7.76f, 7.76f, 0.0f, true, false, 0.28f, -13.27f)
lineToRelative(-5.53f, 3.23f)
curveToRelative(-1.57f, 0.92f, -2.11f, 2.95f, -1.2f, 4.54f)
arcToRelative(3.25f, 3.25f, 0.0f, false, false, 4.47f, 1.22f)
lineToRelative(5.53f, -3.23f)
lineToRelative(0.26f, -0.16f)
lineToRelative(0.26f, 0.17f)
arcToRelative(7.56f, 7.56f, 0.0f, false, false, 7.93f, 0.17f)
curveToRelative(3.66f, -2.14f, 4.92f, -6.89f, 2.8f, -10.61f)
curveToRelative(-2.12f, -3.71f, -6.79f, -4.98f, -10.45f, -2.84f)
lineToRelative(-0.25f, -0.43f)
lineToRelative(0.25f, 0.43f)
arcToRelative(7.76f, 7.76f, 0.0f, false, false, -3.88f, 7.05f)
curveToRelative(-2.55f, 1.49f, -3.94f, 4.26f, -3.82f, 7.05f)
close()
}
path(
@@ -138,7 +153,7 @@ val AppIllus.TwoPadlocksIntertwinedStarsDark: ImageVector
strokeLineMiter = 4.0f,
pathFillType = NonZero
) {
moveTo(232.7f, 117.28f)
moveTo(302.7f, 149.28f)
arcToRelative(7.65f, 7.65f, 0.0f, false, true, 2.77f, 10.45f)
lineToRelative(-32.96f, 56.75f)
arcToRelative(7.65f, 7.65f, 0.0f, false, true, -10.45f, 2.77f)
@@ -157,31 +172,28 @@ val AppIllus.TwoPadlocksIntertwinedStarsDark: ImageVector
strokeLineMiter = 4.0f,
pathFillType = NonZero
) {
moveToRelative(189.02f, 134.59f)
moveToRelative(255.61f, 166.59f)
lineToRelative(-0.01f, 0.3f)
lineToRelative(0.26f, 0.15f)
lineToRelative(5.6f, 3.23f)
arcToRelative(3.32f, 3.32f, 0.0f, false, true, -3.32f, 5.76f)
lineToRelative(-5.6f, -3.23f)
lineToRelative(-0.26f, -0.15f)
lineToRelative(-0.26f, 0.16f)
arcToRelative(7.76f, 7.76f, 0.0f, false, true, -10.89f, -10.43f)
arcToRelative(7.76f, 7.76f, 0.0f, false, true, 10.6f, -2.84f)
lineToRelative(5.53f, 3.23f)
curveToRelative(1.57f, 0.92f, 2.11f, 2.95f, 1.2f, 4.54f)
arcToRelative(3.25f, 3.25f, 0.0f, false, true, -4.47f, 1.22f)
lineToRelative(-5.53f, -3.23f)
lineToRelative(-0.26f, -0.16f)
lineToRelative(-0.26f, 0.17f)
arcToRelative(7.56f, 7.56f, 0.0f, false, true, -7.93f, 0.17f)
curveToRelative(-3.66f, -2.14f, -4.92f, -6.89f, -2.8f, -10.61f)
curveToRelative(2.12f, -3.71f, 6.79f, -4.98f, 10.45f, -2.84f)
lineToRelative(0.25f, -0.43f)
lineToRelative(-0.25f, 0.43f)
arcToRelative(7.76f, 7.76f, 0.0f, false, true, 3.88f, 7.05f)
curveToRelative(2.55f, 1.49f, 3.94f, 4.26f, 3.82f, 7.05f)
close()
}
path(
fill = SolidColor(Color(0xFF67DD95)),
stroke = null,
strokeLineWidth = 0.0f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero
) {
moveToRelative(109.05f, 14.08f)
moveToRelative(179.05f, 46.08f)
lineToRelative(2.95f, -9.28f)
lineToRelative(-4.76f, -1.51f)
lineToRelative(-2.95f, 9.28f)
@@ -200,14 +212,9 @@ val AppIllus.TwoPadlocksIntertwinedStarsDark: ImageVector
}
path(
fill = SolidColor(Color(0xFFDCE4E5)),
stroke = null,
strokeLineWidth = 0.0f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero
) {
moveToRelative(80.06f, 52.37f)
moveToRelative(150.06f, 84.37f)
lineToRelative(1.02f, -3.23f)
lineToRelative(-1.65f, -0.52f)
lineToRelative(-1.03f, 3.23f)
@@ -220,16 +227,16 @@ val AppIllus.TwoPadlocksIntertwinedStarsDark: ImageVector
lineToRelative(1.14f, 3.38f)
lineToRelative(1.55f, -0.55f)
lineToRelative(-1.04f, -3.23f)
lineToRelative(3.46f, -0.09f)
lineToRelative(3.47f, -0.09f)
lineToRelative(-0.14f, -1.72f)
close()
moveTo(148.2f, 33.79f)
moveTo(218.2f, 65.79f)
lineToRelative(1.53f, -4.82f)
lineToRelative(-2.47f, -0.79f)
lineToRelative(-1.53f, 4.82f)
lineToRelative(-4.03f, -3.2f)
lineToRelative(-1.53f, 2.01f)
lineToRelative(4.06f, 3.07f)
lineToRelative(4.06f, 3.08f)
lineToRelative(-4.1f, 3.07f)
lineToRelative(1.71f, 2.06f)
lineToRelative(4.05f, -3.22f)
@@ -241,15 +248,15 @@ val AppIllus.TwoPadlocksIntertwinedStarsDark: ImageVector
close()
}
}.build()
return _twoPadlocksIntertwinedStarsDark!!
return _twoLocksIntertwinedStarsDark!!
}

private var _twoPadlocksIntertwinedStarsDark: ImageVector? = null
private var _twoLocksIntertwinedStarsDark: ImageVector? = null

@Preview
@Composable
private fun Preview() {
val imageVector = AppIllus.TwoPadlocksIntertwinedStarsDark
val imageVector = AppIllus.TwoLocksIntertwinedStarsDark
Box {
Image(
imageVector = imageVector,
Loading

0 comments on commit 6c0cd2c

Please sign in to comment.