Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Optimize MenuChip
Browse files Browse the repository at this point in the history
  • Loading branch information
SanmerDev committed Jun 28, 2024
1 parent 3069942 commit c616d75
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/main/kotlin/dev/sanmer/mrepo/ui/component/MenuChip.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Done
import androidx.compose.material3.FilterChip
import androidx.compose.material3.FilterChipDefaults
import androidx.compose.material3.Icon
Expand All @@ -14,8 +12,10 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import dev.sanmer.mrepo.R

@Composable
fun MenuChip(
Expand All @@ -38,7 +38,7 @@ fun MenuChip(
trailingIcon = {
if (selected) {
Icon(
imageVector = Icons.Filled.Done,
painter = painterResource(id = R.drawable.check),
contentDescription = null,
modifier = Modifier.size(FilterChipDefaults.IconSize)
)
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/check.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M5,12l5,5l10,-10"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:strokeColor="#ffff"
android:strokeLineCap="round"/>
</vector>

0 comments on commit c616d75

Please sign in to comment.