mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor(icons): migrate to self-hosted VectorDrawable XMLs via MeshtasticIcons (#5030)
This commit is contained in:
parent
5e57efeb06
commit
dba037466e
344 changed files with 3760 additions and 2631 deletions
|
|
@ -24,15 +24,15 @@ import androidx.compose.foundation.layout.Spacer
|
|||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.filled.Message
|
||||
import androidx.compose.material.icons.automirrored.filled.VolumeOff
|
||||
import androidx.compose.material.icons.automirrored.filled.VolumeUp
|
||||
import androidx.compose.material.icons.automirrored.outlined.VolumeMute
|
||||
import androidx.compose.material.icons.filled.Star
|
||||
import androidx.compose.material.icons.filled.StarBorder
|
||||
import androidx.compose.material.icons.rounded.Delete
|
||||
import androidx.compose.material.icons.rounded.QrCode2
|
||||
import org.meshtastic.core.ui.icon.Delete
|
||||
import org.meshtastic.core.ui.icon.Favorite
|
||||
import org.meshtastic.core.ui.icon.MeshtasticIcons
|
||||
import org.meshtastic.core.ui.icon.Message
|
||||
import org.meshtastic.core.ui.icon.NotFavorite
|
||||
import org.meshtastic.core.ui.icon.QrCode2
|
||||
import org.meshtastic.core.ui.icon.VolumeMute
|
||||
import org.meshtastic.core.ui.icon.VolumeOff
|
||||
import org.meshtastic.core.ui.icon.VolumeUp
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.CardDefaults
|
||||
|
|
@ -190,7 +190,7 @@ private fun PrimaryActionsRow(
|
|||
contentColor = MaterialTheme.colorScheme.onPrimaryContainer,
|
||||
),
|
||||
) {
|
||||
Icon(Icons.AutoMirrored.Filled.Message, contentDescription = null)
|
||||
Icon(MeshtasticIcons.Message, contentDescription = null)
|
||||
Spacer(Modifier.width(8.dp))
|
||||
Text(stringResource(Res.string.direct_message))
|
||||
}
|
||||
|
|
@ -201,7 +201,7 @@ private fun PrimaryActionsRow(
|
|||
modifier = if (node.isEffectivelyUnmessageable || isLocal) Modifier.weight(1f) else Modifier,
|
||||
shape = MaterialTheme.shapes.large,
|
||||
) {
|
||||
Icon(Icons.Rounded.QrCode2, contentDescription = null)
|
||||
Icon(MeshtasticIcons.QrCode2, contentDescription = null)
|
||||
if (node.isEffectivelyUnmessageable || isLocal) {
|
||||
Spacer(Modifier.width(8.dp))
|
||||
Text(stringResource(Res.string.share_contact))
|
||||
|
|
@ -210,7 +210,7 @@ private fun PrimaryActionsRow(
|
|||
|
||||
IconToggleButton(checked = node.isFavorite, onCheckedChange = { onFavoriteClick() }) {
|
||||
Icon(
|
||||
imageVector = if (node.isFavorite) Icons.Rounded.Star else Icons.Rounded.StarBorder,
|
||||
imageVector = if (node.isFavorite) MeshtasticIcons.Favorite else MeshtasticIcons.NotFavorite,
|
||||
contentDescription = stringResource(Res.string.favorite),
|
||||
tint = if (node.isFavorite) Color.Yellow else LocalContentColor.current,
|
||||
)
|
||||
|
|
@ -230,9 +230,9 @@ private fun ManagementActions(
|
|||
text = stringResource(Res.string.ignore),
|
||||
leadingIcon =
|
||||
if (node.isIgnored) {
|
||||
Icons.AutoMirrored.Outlined.VolumeMute
|
||||
MeshtasticIcons.VolumeMute
|
||||
} else {
|
||||
Icons.AutoMirrored.Default.VolumeUp
|
||||
MeshtasticIcons.VolumeUp
|
||||
},
|
||||
checked = node.isIgnored,
|
||||
onClick = onIgnoreClick,
|
||||
|
|
@ -241,9 +241,9 @@ private fun ManagementActions(
|
|||
SwitchListItem(
|
||||
text = stringResource(if (node.isMuted) Res.string.unmute else Res.string.mute_always),
|
||||
leadingIcon = if (node.isMuted) {
|
||||
Icons.AutoMirrored.Filled.VolumeOff
|
||||
MeshtasticIcons.VolumeOff
|
||||
} else {
|
||||
Icons.AutoMirrored.Default.VolumeUp
|
||||
MeshtasticIcons.VolumeUp
|
||||
},
|
||||
checked = node.isMuted,
|
||||
onClick = onMuteClick,
|
||||
|
|
@ -251,7 +251,7 @@ private fun ManagementActions(
|
|||
|
||||
ListItem(
|
||||
text = stringResource(Res.string.remove),
|
||||
leadingIcon = Icons.Rounded.Delete,
|
||||
leadingIcon = MeshtasticIcons.Delete,
|
||||
trailingIcon = null,
|
||||
textColor = MaterialTheme.colorScheme.error,
|
||||
leadingIconTint = MaterialTheme.colorScheme.error,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue