Change chip icon size

This commit is contained in:
MM20 2023-08-21 02:01:57 +02:00
parent 7c87944727
commit 1a7eaafb7a
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
3 changed files with 22 additions and 6 deletions

View File

@ -12,12 +12,14 @@ import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.Edit
import androidx.compose.material.icons.rounded.ExpandLess
import androidx.compose.material.icons.rounded.ExpandMore
import androidx.compose.material.icons.rounded.Star
import androidx.compose.material3.FilterChip
import androidx.compose.material3.FilterChipDefaults
import androidx.compose.material3.FloatingActionButtonDefaults
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
@ -84,7 +86,8 @@ fun FavoritesTagSelector(
leadingIcon = {
Icon(
imageVector = Icons.Rounded.Star,
contentDescription = null
contentDescription = null,
modifier = Modifier.size(FilterChipDefaults.IconSize),
)
},
label = { Text(stringResource(R.string.favorites)) }
@ -117,7 +120,8 @@ fun FavoritesTagSelector(
leadingIcon = {
Icon(
imageVector = Icons.Rounded.Star,
contentDescription = null
contentDescription = null,
modifier = Modifier.size(FilterChipDefaults.IconSize),
)
},
label = { Text(stringResource(R.string.favorites)) }

View File

@ -1,6 +1,7 @@
package de.mm20.launcher2.ui.common
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.Close
import androidx.compose.material.icons.rounded.Tag
@ -31,6 +32,7 @@ fun TagChip(
onClick = onClick,
leadingIcon = {
Icon(
modifier = Modifier.size(FilterChipDefaults.IconSize),
imageVector = Icons.Rounded.Tag,
contentDescription = null
)
@ -47,9 +49,9 @@ fun TagChip(
Icon(
modifier = Modifier.clickable {
onClear?.invoke()
},
}.size(FilterChipDefaults.IconSize),
imageVector = Icons.Rounded.Close,
contentDescription = null
contentDescription = null,
)
}
} else null

View File

@ -10,6 +10,7 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyItemScope
import androidx.compose.foundation.lazy.LazyListScope
@ -24,6 +25,7 @@ import androidx.compose.material.icons.rounded.Star
import androidx.compose.material.icons.rounded.Tag
import androidx.compose.material.icons.rounded.Work
import androidx.compose.material3.FilterChip
import androidx.compose.material3.FilterChipDefaults
import androidx.compose.material3.FloatingActionButtonDefaults
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
@ -181,7 +183,11 @@ fun SearchColumn(
selected = !showWorkProfileApps,
onClick = { showWorkProfileApps = false },
leadingIcon = {
Icon(imageVector = Icons.Rounded.Person, contentDescription = null)
Icon(
imageVector = Icons.Rounded.Person,
contentDescription = null,
modifier = Modifier.size(FilterChipDefaults.IconSize)
)
},
label = {
Text(
@ -195,7 +201,11 @@ fun SearchColumn(
selected = showWorkProfileApps,
onClick = { showWorkProfileApps = true },
leadingIcon = {
Icon(imageVector = Icons.Rounded.Work, contentDescription = null)
Icon(
imageVector = Icons.Rounded.Work,
contentDescription = null,
modifier = Modifier.size(FilterChipDefaults.IconSize)
)
},
label = {
Text(