Skip to content

Commit

Permalink
refactor: Rename some Illustrations
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Oct 31, 2024
1 parent dbf2665 commit 93d9167
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 1,543 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* 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.uploadSuccessQr
package com.infomaniak.swisstransfer.ui.images.illus.beers

import android.content.res.Configuration
import androidx.compose.foundation.Image
Expand All @@ -29,13 +29,13 @@ import com.infomaniak.swisstransfer.ui.images.AppImages.AppIllus
import com.infomaniak.swisstransfer.ui.images.ThemedImage
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme

val AppIllus.UploadSuccessQr: ThemedImage
get() = _uploadSuccessQr ?: object : ThemedImage {
override val light = AppIllus.UploadSuccessQrLight
override val dark = AppIllus.UploadSuccessQrDark
}.also { _uploadSuccessQr = it }
val AppIllus.Beers: ThemedImage
get() = _beers ?: object : ThemedImage {
override val light = AppIllus.BeersLight
override val dark = AppIllus.BeersDark
}.also { _beers = it }

private var _uploadSuccessQr: ThemedImage? = null
private var _beers: ThemedImage? = null

@Preview(name = "Light")
@Preview(name = "Dark", uiMode = Configuration.UI_MODE_NIGHT_YES or Configuration.UI_MODE_TYPE_NORMAL)
Expand All @@ -44,7 +44,7 @@ private fun Preview() {
SwissTransferTheme {
Box {
Image(
imageVector = AppIllus.UploadSuccessQr.image(),
imageVector = AppIllus.Beers.image(),
contentDescription = null,
modifier = Modifier.size(AppImages.previewSize),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* 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.uploadSuccessQr
package com.infomaniak.swisstransfer.ui.images.illus.beers

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
Expand All @@ -38,13 +38,13 @@ import androidx.compose.ui.unit.dp
import com.infomaniak.swisstransfer.ui.images.AppImages.AppIllus
import com.infomaniak.swisstransfer.ui.images.AppImages.previewSize

val AppIllus.UploadSuccessQrDark: ImageVector
val AppIllus.BeersDark: ImageVector
get() {

if (_uploadSuccessQrDark != null) return _uploadSuccessQrDark!!
if (_beersDark != null) return _beersDark!!

_uploadSuccessQrDark = Builder(
name = "UploadSuccessQrDark",
_beersDark = Builder(
name = "BeersDark",
defaultWidth = 175.0.dp,
defaultHeight = 115.0.dp,
viewportWidth = 175.0f,
Expand Down Expand Up @@ -126,8 +126,7 @@ val AppIllus.UploadSuccessQrDark: ImageVector
close()
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
stroke = SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
Round, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand All @@ -139,8 +138,7 @@ val AppIllus.UploadSuccessQrDark: ImageVector
lineTo(39.33f, 83.72f)
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
stroke = SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
Round, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand All @@ -152,8 +150,7 @@ val AppIllus.UploadSuccessQrDark: ImageVector
lineTo(50.94f, 86.56f)
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
stroke = SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
Round, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand Down Expand Up @@ -235,8 +232,7 @@ val AppIllus.UploadSuccessQrDark: ImageVector
arcToRelative(0.75f, 0.75f, 58.72f, true, true, -1.45f, -0.35f)
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFFDCE4E5)), strokeLineWidth = 0.5f, strokeLineCap =
stroke = SolidColor(Color(0xFFDCE4E5)), strokeLineWidth = 0.5f, strokeLineCap =
Butt, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand Down Expand Up @@ -323,8 +319,7 @@ val AppIllus.UploadSuccessQrDark: ImageVector
close()
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
stroke = SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
Round, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand All @@ -336,8 +331,7 @@ val AppIllus.UploadSuccessQrDark: ImageVector
lineTo(133.81f, 74.58f)
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
stroke = SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
Round, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand All @@ -349,8 +343,7 @@ val AppIllus.UploadSuccessQrDark: ImageVector
lineTo(122.9f, 79.46f)
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
stroke = SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
Round, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand Down Expand Up @@ -432,8 +425,7 @@ val AppIllus.UploadSuccessQrDark: ImageVector
arcToRelative(0.75f, 0.75f, 110.89f, true, false, 1.36f, -0.61f)
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFFDCE4E5)), strokeLineWidth = 0.5f, strokeLineCap =
stroke = SolidColor(Color(0xFFDCE4E5)), strokeLineWidth = 0.5f, strokeLineCap =
Butt, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand Down Expand Up @@ -535,17 +527,17 @@ val AppIllus.UploadSuccessQrDark: ImageVector
}
}.build()

return _uploadSuccessQrDark!!
return _beersDark!!
}

private var _uploadSuccessQrDark: ImageVector? = null
private var _beersDark: ImageVector? = null

@Preview
@Composable
private fun Preview() {
Box(modifier = Modifier.background(Color.White)) {
Image(
imageVector = AppIllus.UploadSuccessQrDark,
imageVector = AppIllus.BeersDark,
contentDescription = null,
modifier = Modifier.size(previewSize),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* 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.uploadSuccessQr
package com.infomaniak.swisstransfer.ui.images.illus.beers

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
Expand All @@ -38,13 +38,13 @@ import androidx.compose.ui.unit.dp
import com.infomaniak.swisstransfer.ui.images.AppImages.AppIllus
import com.infomaniak.swisstransfer.ui.images.AppImages.previewSize

val AppIllus.UploadSuccessQrLight: ImageVector
val AppIllus.BeersLight: ImageVector
get() {

if (_uploadSuccessQrLight != null) return _uploadSuccessQrLight!!
if (_beersLight != null) return _beersLight!!

_uploadSuccessQrLight = Builder(
name = "UploadSuccessQrLight",
_beersLight = Builder(
name = "BeersLight",
defaultWidth = 175.0.dp,
defaultHeight = 115.0.dp,
viewportWidth = 175.0f,
Expand Down Expand Up @@ -126,8 +126,7 @@ val AppIllus.UploadSuccessQrLight: ImageVector
close()
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
stroke = SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
Round, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand All @@ -139,8 +138,7 @@ val AppIllus.UploadSuccessQrLight: ImageVector
lineTo(39.33f, 83.72f)
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
stroke = SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
Round, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand All @@ -152,8 +150,7 @@ val AppIllus.UploadSuccessQrLight: ImageVector
lineTo(50.94f, 86.56f)
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
stroke = SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
Round, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand Down Expand Up @@ -235,8 +232,7 @@ val AppIllus.UploadSuccessQrLight: ImageVector
arcToRelative(0.75f, 0.75f, 58.72f, true, true, -1.45f, -0.35f)
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
stroke = SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
Butt, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand Down Expand Up @@ -323,8 +319,7 @@ val AppIllus.UploadSuccessQrLight: ImageVector
close()
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
stroke = SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
Round, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand All @@ -336,8 +331,7 @@ val AppIllus.UploadSuccessQrLight: ImageVector
lineTo(133.81f, 74.58f)
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
stroke = SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
Round, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand All @@ -349,8 +343,7 @@ val AppIllus.UploadSuccessQrLight: ImageVector
lineTo(122.9f, 79.46f)
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
stroke = SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
Round, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand Down Expand Up @@ -432,8 +425,7 @@ val AppIllus.UploadSuccessQrLight: ImageVector
arcToRelative(0.75f, 0.75f, 110.89f, true, false, 1.36f, -0.61f)
}
path(
fill = SolidColor(Color(0x00000000)), stroke =
SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
stroke = SolidColor(Color(0xFF014958)), strokeLineWidth = 1.0f, strokeLineCap =
Butt, strokeLineJoin = Miter, strokeLineMiter = 4.0f, pathFillType =
NonZero
) {
Expand Down Expand Up @@ -535,17 +527,17 @@ val AppIllus.UploadSuccessQrLight: ImageVector
}
}.build()

return _uploadSuccessQrLight!!
return _beersLight!!
}

private var _uploadSuccessQrLight: ImageVector? = null
private var _beersLight: ImageVector? = null

@Preview
@Composable
private fun Preview() {
Box(modifier = Modifier.background(Color.White)) {
Image(
imageVector = AppIllus.UploadSuccessQrLight,
imageVector = AppIllus.BeersLight,
contentDescription = null,
modifier = Modifier.size(previewSize),
)
Expand Down

This file was deleted.

Loading

0 comments on commit 93d9167

Please sign in to comment.