Skip to content

Commit

Permalink
Fix flags
Browse files Browse the repository at this point in the history
  • Loading branch information
tevincent committed Aug 27, 2024
1 parent e4be142 commit 2a21367
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.infomaniak.swisstransfer.ui.icons.illu
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
import androidx.compose.ui.graphics.Color
Expand All @@ -12,6 +13,7 @@ import androidx.compose.ui.graphics.StrokeCap.Companion.Butt
import androidx.compose.ui.graphics.StrokeJoin.Companion.Miter
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.ImageVector.Builder
import androidx.compose.ui.graphics.vector.PathData
import androidx.compose.ui.graphics.vector.group
import androidx.compose.ui.graphics.vector.path
import androidx.compose.ui.tooling.preview.Preview
Expand All @@ -30,7 +32,18 @@ val AppIcons.EnglishFlag: ImageVector
viewportWidth = 24.0f,
viewportHeight = 24.0f
).apply {
group {
group(clipPathData = PathData {
moveTo(1.333f, 3.0f)
horizontalLineToRelative(21.334f)
arcTo(1.333f, 1.333f, 0.0f, false, true, 24.0f, 4.333f)
verticalLineToRelative(16.65f)
arcToRelative(1.333f, 1.333f, 0.0f, false, true, -1.333f, 1.333f)
horizontalLineTo(1.333f)
arcTo(1.333f, 1.333f, 0.0f, false, true, 0.0f, 20.334f)
verticalLineTo(4.333f)
arcTo(1.333f, 1.333f, 0.0f, false, true, 1.333f, 3.0f)
close()
}) {
path(
fill = SolidColor(Color(0xFF0B5394)), stroke = null, strokeLineWidth =
0.0f, strokeLineCap = Butt, strokeLineJoin = Miter, strokeLineMiter =
Expand All @@ -39,10 +52,10 @@ val AppIcons.EnglishFlag: ImageVector
moveTo(1.333f, 3.0f)
horizontalLineToRelative(21.334f)
arcTo(1.333f, 1.333f, 0.0f, false, true, 24.0f, 4.333f)
verticalLineToRelative(15.334f)
arcTo(1.333f, 1.333f, 0.0f, false, true, 22.667f, 21.0f)
verticalLineToRelative(16.65f)
arcToRelative(1.333f, 1.333f, 0.0f, false, true, -1.333f, 1.333f)
horizontalLineTo(1.333f)
arcTo(1.333f, 1.333f, 0.0f, false, true, 0.0f, 19.667f)
arcTo(1.333f, 1.333f, 0.0f, false, true, 0.0f, 20.334f)
verticalLineTo(4.333f)
arcTo(1.333f, 1.333f, 0.0f, false, true, 1.333f, 3.0f)
close()
Expand Down Expand Up @@ -153,7 +166,7 @@ val AppIcons.EnglishFlag: ImageVector
) {
moveTo(9.333f, 3.0f)
horizontalLineToRelative(5.333f)
verticalLineToRelative(18.667f)
verticalLineToRelative(19.3f)
horizontalLineTo(9.333f)
close()
}
Expand All @@ -164,7 +177,7 @@ val AppIcons.EnglishFlag: ImageVector
) {
moveTo(10.667f, 3.0f)
horizontalLineToRelative(2.667f)
verticalLineToRelative(18.667f)
verticalLineToRelative(19.3f)
horizontalLineToRelative(-2.667f)
close()
}
Expand All @@ -191,6 +204,10 @@ private var _englishFlag: ImageVector? = null
@Composable
private fun Preview() {
Box(modifier = Modifier.padding(12.dp)) {
Image(imageVector = AppIcons.EnglishFlag, contentDescription = "")
Image(
imageVector = AppIcons.EnglishFlag,
contentDescription = "",
modifier = Modifier.size(AppIcons.previewSize)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.infomaniak.swisstransfer.ui.icons.illu
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
import androidx.compose.ui.graphics.Color
Expand Down Expand Up @@ -99,6 +100,10 @@ private var _frenchFlag: ImageVector? = null
@Composable
private fun Preview() {
Box(modifier = Modifier.padding(12.dp)) {
Image(imageVector = AppIcons.FrenchFlag, contentDescription = "")
Image(
imageVector = AppIcons.FrenchFlag,
contentDescription = "",
modifier = Modifier.size(AppIcons.previewSize)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.infomaniak.swisstransfer.ui.icons.illu
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
import androidx.compose.ui.graphics.Color
Expand Down Expand Up @@ -81,6 +82,10 @@ private var _germanFlag: ImageVector? = null
@Composable
private fun Preview() {
Box(modifier = Modifier.padding(12.dp)) {
Image(imageVector = AppIcons.GermanFlag, contentDescription = "")
Image(
imageVector = AppIcons.GermanFlag,
contentDescription = "",
modifier = Modifier.size(AppIcons.previewSize)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.infomaniak.swisstransfer.ui.icons.illu
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
import androidx.compose.ui.graphics.Color
Expand All @@ -16,6 +17,7 @@ import androidx.compose.ui.graphics.vector.group
import androidx.compose.ui.graphics.vector.path
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.core.graphics.translationMatrix
import com.infomaniak.swisstransfer.ui.icons.AppIcons

val AppIcons.ItalianFlag: ImageVector
Expand Down Expand Up @@ -55,9 +57,9 @@ val AppIcons.ItalianFlag: ImageVector
moveTo(0.0f, 4.333f)
curveTo(0.0f, 3.597f, 0.597f, 3.0f, 1.333f, 3.0f)
horizontalLineTo(8.0f)
verticalLineToRelative(18.667f)
verticalLineToRelative(18.0f)
horizontalLineTo(1.333f)
arcTo(1.333f, 1.333f, 0.0f, false, true, 0.0f, 20.333f)
arcTo(1.333f, 1.333f, 0.0f, false, true, 0.0f, 19.6f)
close()
}
path(
Expand All @@ -67,7 +69,7 @@ val AppIcons.ItalianFlag: ImageVector
) {
moveTo(8.0f, 3.0f)
horizontalLineToRelative(8.0f)
verticalLineToRelative(18.667f)
verticalLineToRelative(18.0f)
horizontalLineTo(8.0f)
close()
}
Expand All @@ -83,6 +85,10 @@ private var _italianFlag: ImageVector? = null
@Composable
private fun Preview() {
Box(modifier = Modifier.padding(12.dp)) {
Image(imageVector = AppIcons.ItalianFlag, contentDescription = "")
Image(
imageVector = AppIcons.ItalianFlag,
contentDescription = "",
modifier = Modifier.size(AppIcons.previewSize)
)
}
}

0 comments on commit 2a21367

Please sign in to comment.