From d4d9898d6ac7dc980661d4fd6640102b510e5355 Mon Sep 17 00:00:00 2001 From: Gibran Chevalley Date: Thu, 15 Aug 2024 13:14:34 +0200 Subject: [PATCH] Centralize icon preview size in a constant value --- .../java/com/infomaniak/swisstransfer/ui/icons/AppIcons.kt | 4 ++++ .../java/com/infomaniak/swisstransfer/ui/icons/app/Add.kt | 2 +- .../infomaniak/swisstransfer/ui/icons/app/ArrowDownCircle.kt | 2 +- .../infomaniak/swisstransfer/ui/icons/app/ArrowUpCircle.kt | 2 +- .../com/infomaniak/swisstransfer/ui/icons/app/Settings.kt | 3 +-- .../swisstransfer/ui/icons/illu/ArrowCurvedDownright.kt | 3 ++- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/AppIcons.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/AppIcons.kt index e5d2a7b5f..9a8a43d16 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/AppIcons.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/AppIcons.kt @@ -18,6 +18,10 @@ package com.infomaniak.swisstransfer.ui.icons +import androidx.compose.ui.unit.dp + object AppIcons { object Illu + + val previewSize = 250.dp } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/Add.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/Add.kt index a60af7e80..b58fbba4d 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/Add.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/Add.kt @@ -59,7 +59,7 @@ private fun Preview() { Image( imageVector = AppIcons.Add, contentDescription = null, - modifier = Modifier.size(250.dp) + modifier = Modifier.size(AppIcons.previewSize) ) } } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/ArrowDownCircle.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/ArrowDownCircle.kt index 6b92552be..0a2dec27c 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/ArrowDownCircle.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/ArrowDownCircle.kt @@ -93,7 +93,7 @@ private fun Preview() { Image( imageVector = AppIcons.ArrowDownCircle, contentDescription = null, - modifier = Modifier.size(250.dp) + modifier = Modifier.size(AppIcons.previewSize) ) } } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/ArrowUpCircle.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/ArrowUpCircle.kt index e573fc38a..804d114a9 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/ArrowUpCircle.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/ArrowUpCircle.kt @@ -93,7 +93,7 @@ private fun Preview() { Image( imageVector = AppIcons.ArrowUpCircle, contentDescription = null, - modifier = Modifier.size(250.dp) + modifier = Modifier.size(AppIcons.previewSize) ) } } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/Settings.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/Settings.kt index d3b95b998..7ae63f24b 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/Settings.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/app/Settings.kt @@ -20,7 +20,6 @@ package com.infomaniak.swisstransfer.ui.icons.app import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -116,7 +115,7 @@ private fun Preview() { Image( imageVector = AppIcons.Settings, contentDescription = null, - modifier = Modifier.size(250.dp) + modifier = Modifier.size(AppIcons.previewSize) ) } } diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/ArrowCurvedDownright.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/ArrowCurvedDownright.kt index 56d7b5b97..548f61e8c 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/ArrowCurvedDownright.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/icons/illu/ArrowCurvedDownright.kt @@ -35,6 +35,7 @@ import androidx.compose.ui.graphics.vector.path import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.infomaniak.swisstransfer.ui.icons.AppIcons +import com.infomaniak.swisstransfer.ui.icons.AppIcons.previewSize val AppIcons.Illu.ArrowCurvedDownright: ImageVector get() { @@ -83,7 +84,7 @@ private fun Preview() { Image( imageVector = AppIcons.Illu.ArrowCurvedDownright, contentDescription = null, - modifier = Modifier.size(250.dp) + modifier = Modifier.size(previewSize) ) } }