Skip to content

Commit

Permalink
Merge pull request #21 from Infomaniak/icon-preview-const
Browse files Browse the repository at this point in the history
Use a variable to centralize the icon preview sizes
  • Loading branch information
LunarX authored Aug 15, 2024
2 parents 4414ff0 + d4d9898 commit 93e04b7
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@

package com.infomaniak.swisstransfer.ui.icons

import androidx.compose.ui.unit.dp

object AppIcons {
object Illu

val previewSize = 250.dp
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private fun Preview() {
Image(
imageVector = AppIcons.Add,
contentDescription = null,
modifier = Modifier.size(250.dp)
modifier = Modifier.size(AppIcons.previewSize)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private fun Preview() {
Image(
imageVector = AppIcons.ArrowDownCircle,
contentDescription = null,
modifier = Modifier.size(250.dp)
modifier = Modifier.size(AppIcons.previewSize)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private fun Preview() {
Image(
imageVector = AppIcons.ArrowUpCircle,
contentDescription = null,
modifier = Modifier.size(250.dp)
modifier = Modifier.size(AppIcons.previewSize)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -116,7 +115,7 @@ private fun Preview() {
Image(
imageVector = AppIcons.Settings,
contentDescription = null,
modifier = Modifier.size(250.dp)
modifier = Modifier.size(AppIcons.previewSize)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -83,7 +84,7 @@ private fun Preview() {
Image(
imageVector = AppIcons.Illu.ArrowCurvedDownright,
contentDescription = null,
modifier = Modifier.size(250.dp)
modifier = Modifier.size(previewSize)
)
}
}

0 comments on commit 93e04b7

Please sign in to comment.