Merge pull request #3106 from vitorpamplona/claude/lucid-goldberg-YUBPw

Redesign Cashu icon as monochrome tintable glyph
This commit is contained in:
Vitor Pamplona
2026-05-29 19:37:35 -04:00
committed by GitHub
9 changed files with 147 additions and 247 deletions
@@ -161,7 +161,6 @@ fun CashuPreviewNew(
imageVector = CustomHashTagIcons.Cashu,
null,
modifier = Modifier.size(13.dp),
tint = Color.Unspecified,
)
Text(
@@ -244,7 +244,6 @@ fun CashuIcon(modifier: Modifier) {
Icon(
imageVector = CustomHashTagIcons.Cashu,
stringRes(R.string.cashu),
tint = Color.Unspecified,
modifier = modifier,
)
}
@@ -380,16 +380,10 @@ fun RenderNutzapGallery(
Box(
modifier = WidthAuthorPictureModifier,
) {
// CustomHashTagIcons.Cashu is a multi-tone branded glyph;
// tint=Unspecified keeps the brand colours instead of
// flattening to onBackground (which would lose the cashu-
// orange distinguishing the row from the lightning-bolt
// row above it).
Icon(
imageVector = CustomHashTagIcons.Cashu,
contentDescription = stringRes(R.string.nutzap),
modifier = Modifier.size(Size20dp).align(Alignment.TopEnd),
tint = Color.Unspecified,
)
}
@@ -34,7 +34,6 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import com.vitorpamplona.amethyst.R
import com.vitorpamplona.amethyst.commons.hashtags.Cashu
import com.vitorpamplona.amethyst.commons.hashtags.CustomHashTagIcons
@@ -91,15 +90,10 @@ private fun RenderNutzapGalleryRow(
) {
Row(Modifier.fillMaxWidth()) {
Box(modifier = WidthAuthorPictureModifier) {
// tint=Unspecified preserves the multi-tone cashu glyph,
// same convention as the notifications and zap-picker
// surfaces. Keeping the rail visually distinct from the
// lightning bolt above it is the whole point of this row.
Icon(
imageVector = CustomHashTagIcons.Cashu,
contentDescription = stringRes(R.string.nutzap),
modifier = Modifier.size(Size20dp).align(Alignment.TopEnd),
tint = Color.Unspecified,
)
}
@@ -34,7 +34,6 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import com.vitorpamplona.amethyst.R
import com.vitorpamplona.amethyst.commons.hashtags.Cashu
@@ -109,13 +108,10 @@ fun NutzapUserSetCompose(
Box(
modifier = Size55Modifier,
) {
// tint=Unspecified so the multi-tone cashu glyph keeps its
// brand colours, the same way it does in the zap chip popup.
Icon(
imageVector = CustomHashTagIcons.Cashu,
contentDescription = stringRes(R.string.nutzap),
modifier = Modifier.size(Size25dp).align(Alignment.TopEnd),
tint = Color.Unspecified,
)
}
}
@@ -2117,15 +2117,10 @@ private fun NutzapAmountChip(
.padding(horizontal = 12.dp, vertical = 6.dp),
verticalAlignment = CenterVertically,
) {
// CustomHashTagIcons.Cashu ships a multi-tone Cashu logo; using
// tint=Unspecified preserves it instead of flattening to onTertiary
// (which would lose the cashu-orange brand cue that distinguishes
// this chip from the orange Lightning bolt next to it).
Material3Icon(
imageVector = CustomHashTagIcons.Cashu,
contentDescription = stringRes(R.string.nutzap),
modifier = Size18Modifier,
tint = Color.Unspecified,
)
Spacer(Modifier.width(2.dp))
Text(
@@ -64,7 +64,6 @@ import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalClipboard
import androidx.compose.ui.res.pluralStringResource
import androidx.compose.ui.text.font.FontWeight
@@ -541,7 +540,6 @@ private fun MintRow(
imageVector = CustomHashTagIcons.Cashu,
contentDescription = null,
modifier = Modifier.size(20.dp),
tint = Color.Unspecified,
)
Spacer(modifier = Modifier.width(12.dp))
Text(text = mint, style = MaterialTheme.typography.bodyMedium, modifier = Modifier.weight(1f))
@@ -58,7 +58,6 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
@@ -402,7 +401,6 @@ private fun RecommendationSuggestionList(
imageVector = CustomHashTagIcons.Cashu,
contentDescription = null,
modifier = Modifier.size(16.dp),
tint = Color.Unspecified,
)
Spacer(modifier = Modifier.width(10.dp))
Text(
@@ -23,16 +23,14 @@ package com.vitorpamplona.amethyst.commons.hashtags
import androidx.compose.foundation.Image
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.PathFillType.Companion.NonZero
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.StrokeCap.Companion.Butt
import androidx.compose.ui.graphics.StrokeJoin.Companion.Miter
import androidx.compose.ui.graphics.StrokeCap.Companion.Round
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.ImageVector.Builder
import androidx.compose.ui.graphics.vector.path
import androidx.compose.ui.graphics.vector.rememberVectorPainter
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.vitorpamplona.amethyst.commons.icons.materialIcon
import androidx.compose.ui.graphics.StrokeJoin.Companion.Round as RoundJoin
@Preview
@Composable
@@ -46,235 +44,164 @@ fun CustomHashTagIconsCashuPreview() {
)
}
// Monochrome, tintable "deez nuts" cashew + pixel-shades mark. The cashew body
// is a smooth rounded outline (1.2 stroke weight, matching the shared Zap
// outline icon) so it tints with the surrounding content colour like a Material
// Symbol; the pixel "deal-with-it" sunglasses stay a solid fill, enlarged so
// they overhang the slimmed body for a bolder look.
public val CustomHashTagIcons.Cashu: ImageVector
get() {
if (customHashTagIconsCashu != null) {
return customHashTagIconsCashu!!
}
customHashTagIconsCashu =
Builder(
name = "Cashu",
defaultWidth = 400.0.dp,
defaultHeight = 400.0.dp,
viewportWidth = 400.0f,
viewportHeight = 400.0f,
).apply {
materialIcon(name = "Cashu") {
path(
fill = SolidColor(Color(0xFFd6c09a)),
stroke = SolidColor(Color(0xFFd6c09a)),
strokeLineWidth = 1.23101f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero,
fill = null,
stroke = SolidColor(Color.Black),
strokeLineWidth = 1.2f,
strokeLineCap = Round,
strokeLineJoin = RoundJoin,
) {
moveTo(248.917f, 2.153f)
verticalLineTo(25.235f)
horizontalLineToRelative(25.236f)
verticalLineToRelative(71.091f)
horizontalLineToRelative(-25.236f)
lineToRelative(0.227f, 24.772f)
lineToRelative(-22.156f, 0.011f)
lineToRelative(-0.135f, 69.22f)
lineToRelative(22.065f, -0.532f)
verticalLineToRelative(45.326f)
horizontalLineToRelative(74.476f)
verticalLineToRelative(24.313f)
horizontalLineToRelative(24.928f)
verticalLineToRelative(24.005f)
horizontalLineToRelative(23.389f)
verticalLineToRelative(69.245f)
horizontalLineToRelative(-23.082f)
verticalLineToRelative(23.082f)
horizontalLineToRelative(-24.928f)
verticalLineToRelative(23.005f)
horizontalLineTo(126.2f)
verticalLineToRelative(-23.005f)
horizontalLineTo(100.503f)
verticalLineTo(352.454f)
horizontalLineTo(74.959f)
verticalLineTo(329.68f)
horizontalLineTo(51.801f)
verticalLineTo(282.901f)
horizontalLineTo(25.949f)
verticalLineTo(49.239f)
horizontalLineToRelative(26.082f)
verticalLineTo(25.158f)
horizontalLineTo(74.574f)
verticalLineTo(2.153f)
moveTo(15.62f, 2.02f)
curveTo(15.74f, 2.16f, 15.60f, 2.39f, 15.71f, 2.51f)
curveTo(15.82f, 2.64f, 16.15f, 2.67f, 16.27f, 2.76f)
curveTo(16.39f, 2.85f, 16.38f, 2.65f, 16.43f, 3.06f)
curveTo(16.48f, 3.47f, 16.58f, 4.70f, 16.57f, 5.24f)
curveTo(16.56f, 5.78f, 16.49f, 6.07f, 16.36f, 6.30f)
curveTo(16.23f, 6.52f, 15.91f, 6.38f, 15.77f, 6.59f)
curveTo(15.64f, 6.81f, 15.67f, 7.37f, 15.55f, 7.58f)
curveTo(15.43f, 7.79f, 15.17f, 7.75f, 15.06f, 7.84f)
curveTo(14.96f, 7.93f, 14.96f, 7.87f, 14.92f, 8.13f)
curveTo(14.87f, 8.39f, 14.78f, 8.89f, 14.78f, 9.39f)
curveTo(14.78f, 9.89f, 14.79f, 10.73f, 14.91f, 11.11f)
curveTo(15.03f, 11.48f, 15.36f, 11.33f, 15.49f, 11.65f)
curveTo(15.61f, 11.98f, 15.60f, 12.74f, 15.67f, 13.04f)
curveTo(15.73f, 13.34f, 15.74f, 13.33f, 15.89f, 13.45f)
curveTo(16.04f, 13.58f, 16.17f, 13.69f, 16.55f, 13.79f)
curveTo(16.94f, 13.89f, 17.89f, 13.95f, 18.20f, 14.03f)
curveTo(18.51f, 14.11f, 18.35f, 14.09f, 18.42f, 14.25f)
curveTo(18.49f, 14.41f, 18.46f, 14.82f, 18.61f, 14.99f)
curveTo(18.76f, 15.17f, 19.18f, 15.12f, 19.32f, 15.31f)
curveTo(19.47f, 15.51f, 19.38f, 16.00f, 19.50f, 16.19f)
curveTo(19.61f, 16.38f, 19.89f, 16.32f, 20.01f, 16.45f)
curveTo(20.13f, 16.57f, 20.19f, 16.45f, 20.22f, 16.96f)
curveTo(20.26f, 17.47f, 20.26f, 18.98f, 20.22f, 19.48f)
curveTo(20.19f, 19.99f, 20.14f, 19.87f, 20.02f, 20.00f)
curveTo(19.90f, 20.13f, 19.62f, 20.07f, 19.51f, 20.25f)
curveTo(19.39f, 20.43f, 19.48f, 20.90f, 19.34f, 21.09f)
curveTo(19.19f, 21.28f, 18.77f, 21.25f, 18.62f, 21.40f)
curveTo(18.48f, 21.54f, 18.56f, 21.83f, 18.47f, 21.97f)
curveTo(18.39f, 22.10f, 18.67f, 22.13f, 18.12f, 22.21f)
curveTo(17.57f, 22.30f, 16.26f, 22.48f, 15.18f, 22.50f)
curveTo(14.10f, 22.52f, 12.33f, 22.38f, 11.64f, 22.31f)
curveTo(10.96f, 22.24f, 11.20f, 22.25f, 11.06f, 22.10f)
curveTo(10.91f, 21.95f, 10.94f, 21.55f, 10.78f, 21.40f)
curveTo(10.63f, 21.24f, 10.27f, 21.37f, 10.11f, 21.17f)
curveTo(9.95f, 20.96f, 9.98f, 20.38f, 9.81f, 20.16f)
curveTo(9.63f, 19.94f, 9.23f, 20.05f, 9.07f, 19.86f)
curveTo(8.92f, 19.67f, 9.01f, 19.20f, 8.90f, 19.03f)
curveTo(8.79f, 18.85f, 8.51f, 18.90f, 8.39f, 18.80f)
curveTo(8.27f, 18.70f, 8.26f, 18.82f, 8.18f, 18.45f)
curveTo(8.11f, 18.08f, 8.07f, 16.97f, 7.95f, 16.59f)
curveTo(7.82f, 16.21f, 7.56f, 16.53f, 7.44f, 16.17f)
curveTo(7.31f, 15.80f, 7.26f, 15.30f, 7.21f, 14.42f)
curveTo(7.15f, 13.55f, 7.09f, 12.59f, 7.11f, 10.94f)
curveTo(7.14f, 9.30f, 7.27f, 5.72f, 7.35f, 4.56f)
curveTo(7.42f, 3.40f, 7.44f, 4.11f, 7.55f, 3.98f)
curveTo(7.66f, 3.85f, 7.90f, 3.97f, 8.01f, 3.78f)
curveTo(8.13f, 3.58f, 8.11f, 3.02f, 8.24f, 2.82f)
curveTo(8.38f, 2.62f, 8.71f, 2.72f, 8.83f, 2.59f)
curveTo(8.95f, 2.45f, 8.89f, 2.15f, 8.97f, 2.01f)
curveTo(9.04f, 1.88f, 9.02f, 1.85f, 9.28f, 1.77f)
curveTo(9.54f, 1.69f, 9.83f, 1.58f, 10.53f, 1.54f)
curveTo(11.22f, 1.49f, 12.69f, 1.48f, 13.44f, 1.50f)
curveTo(14.18f, 1.52f, 14.63f, 1.59f, 15.00f, 1.67f)
curveTo(15.36f, 1.76f, 15.50f, 1.88f, 15.62f, 2.02f)
close()
}
path(
fill = SolidColor(Color(0xFFbb9366)),
stroke = SolidColor(Color(0xFFbb9366)),
strokeLineWidth = 1.23101f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero,
) {
moveTo(74.39f, 2.268f)
lineTo(74.39f, 25.272f)
lineTo(51.847f, 25.272f)
lineTo(51.847f, 49.354f)
lineTo(25.765f, 49.354f)
lineToRelative(0.407f, 233.662f)
lineTo(51.709f, 283.016f)
curveTo(52.428f, 236.898f, 76.75f, 25.19f, 125.239f, 25.349f)
lineTo(125.384f, 2.268f)
path(fill = SolidColor(Color.Black)) {
moveTo(3.78f, 6.90f)
lineTo(3.78f, 8.55f)
lineTo(4.41f, 8.55f)
lineTo(4.41f, 9.50f)
lineTo(4.94f, 9.50f)
lineTo(4.94f, 10.39f)
lineTo(5.60f, 10.39f)
lineTo(5.60f, 11.08f)
lineTo(9.97f, 11.08f)
lineTo(9.97f, 10.37f)
lineTo(10.62f, 10.37f)
lineTo(10.62f, 9.48f)
lineTo(11.28f, 9.48f)
lineTo(11.28f, 7.60f)
lineTo(12.43f, 7.60f)
lineTo(12.43f, 9.46f)
lineTo(13.10f, 9.46f)
lineTo(13.10f, 10.34f)
lineTo(13.61f, 10.34f)
lineTo(13.61f, 11.04f)
lineTo(17.99f, 11.04f)
lineTo(17.99f, 10.36f)
lineTo(18.62f, 10.36f)
lineTo(18.62f, 9.47f)
lineTo(19.30f, 9.47f)
lineTo(19.30f, 8.54f)
lineTo(19.92f, 8.54f)
lineTo(19.92f, 6.93f)
close()
moveTo(51.616f, 283.0f)
verticalLineToRelative(46.795f)
horizontalLineToRelative(23.158f)
verticalLineToRelative(22.774f)
lineTo(99.936f, 352.568f)
lineTo(99.936f, 331.112f)
lineTo(75.162f, 331.112f)
verticalLineToRelative(-47.893f)
moveTo(13.71f, 7.58f)
lineTo(14.32f, 7.58f)
lineTo(14.32f, 8.49f)
lineTo(15.00f, 8.50f)
lineTo(15.00f, 9.40f)
lineTo(15.61f, 9.40f)
lineTo(15.61f, 8.48f)
lineTo(15.01f, 8.48f)
lineTo(15.01f, 7.58f)
lineTo(15.63f, 7.58f)
lineTo(15.63f, 8.49f)
lineTo(16.20f, 8.49f)
lineTo(16.21f, 9.41f)
lineTo(16.80f, 9.42f)
lineTo(16.80f, 10.28f)
lineTo(16.20f, 10.28f)
lineTo(16.21f, 9.41f)
lineTo(15.63f, 9.41f)
lineTo(15.63f, 10.24f)
lineTo(15.01f, 10.24f)
lineTo(15.01f, 9.42f)
lineTo(14.32f, 9.41f)
lineTo(14.32f, 8.50f)
lineTo(13.71f, 8.49f)
close()
moveTo(100.318f, 354.117f)
verticalLineToRelative(21.764f)
horizontalLineToRelative(25.469f)
verticalLineToRelative(-21.764f)
close()
moveTo(323.596f, 354.501f)
verticalLineToRelative(21.379f)
horizontalLineToRelative(24.849f)
verticalLineToRelative(-21.379f)
close()
moveTo(126.016f, 377.506f)
verticalLineToRelative(21.379f)
horizontalLineToRelative(197.501f)
verticalLineToRelative(-21.379f)
moveTo(4.93f, 7.70f)
lineTo(5.54f, 7.70f)
lineTo(5.54f, 8.61f)
lineTo(6.23f, 8.62f)
lineTo(6.23f, 9.52f)
lineTo(6.84f, 9.52f)
lineTo(6.84f, 8.60f)
lineTo(6.23f, 8.60f)
lineTo(6.23f, 7.70f)
lineTo(6.85f, 7.70f)
lineTo(6.85f, 8.61f)
lineTo(7.43f, 8.61f)
lineTo(7.43f, 9.54f)
lineTo(8.03f, 9.54f)
lineTo(8.03f, 10.40f)
lineTo(7.43f, 10.40f)
lineTo(7.43f, 9.54f)
lineTo(6.85f, 9.54f)
lineTo(6.85f, 10.37f)
lineTo(6.23f, 10.37f)
lineTo(6.23f, 9.54f)
lineTo(5.54f, 9.53f)
lineTo(5.54f, 8.62f)
lineTo(4.93f, 8.61f)
close()
}
path(
fill = SolidColor(Color(0xFFc4a47b)),
stroke = SolidColor(Color(0xFFc4a47b)),
strokeLineWidth = 1.23101f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero,
) {
moveTo(74.466f, 25.205f)
lineTo(125.28f, 25.706f)
verticalLineTo(49.249f)
horizontalLineTo(100.505f)
verticalLineTo(213.59f)
horizontalLineToRelative(24.928f)
verticalLineToRelative(47.394f)
horizontalLineToRelative(48.625f)
verticalLineToRelative(24.005f)
horizontalLineToRelative(25.697f)
verticalLineToRelative(22.928f)
horizontalLineToRelative(22.928f)
verticalLineToRelative(23.005f)
horizontalLineToRelative(125.948f)
verticalLineToRelative(23.466f)
horizontalLineToRelative(-24.851f)
verticalLineToRelative(23.005f)
horizontalLineTo(125.972f)
verticalLineToRelative(-23.389f)
horizontalLineToRelative(-25.851f)
verticalLineTo(330.998f)
horizontalLineTo(75.346f)
verticalLineTo(283.291f)
lineTo(51.581f, 283.072f)
lineTo(51.487f, 49.319f)
horizontalLineToRelative(22.77f)
close()
}
path(
fill = SolidColor(Color(0xFF000000)),
stroke = SolidColor(Color(0x00000000)),
strokeLineWidth = 1.23101f,
strokeLineCap = Butt,
strokeLineJoin = Miter,
strokeLineMiter = 4.0f,
pathFillType = NonZero,
) {
moveToRelative(25.598f, 120.678f)
verticalLineToRelative(18.254f)
horizontalLineToRelative(9.75f)
verticalLineToRelative(10.545f)
horizontalLineToRelative(8.151f)
verticalLineToRelative(9.925f)
horizontalLineToRelative(10.192f)
verticalLineToRelative(7.708f)
horizontalLineToRelative(67.434f)
verticalLineToRelative(-7.975f)
horizontalLineToRelative(10.012f)
verticalLineToRelative(-9.836f)
horizontalLineToRelative(10.192f)
verticalLineToRelative(-20.824f)
horizontalLineToRelative(17.722f)
verticalLineToRelative(20.648f)
horizontalLineToRelative(10.278f)
verticalLineToRelative(9.747f)
horizontalLineToRelative(7.886f)
verticalLineToRelative(7.797f)
horizontalLineToRelative(67.523f)
verticalLineToRelative(-7.619f)
horizontalLineToRelative(9.747f)
verticalLineToRelative(-9.836f)
horizontalLineToRelative(10.367f)
verticalLineToRelative(-10.37f)
horizontalLineToRelative(9.572f)
verticalLineToRelative(-17.809f)
close()
moveTo(178.698f, 128.19f)
horizontalLineToRelative(9.394f)
verticalLineToRelative(10.146f)
lineToRelative(10.557f, 0.043f)
verticalLineToRelative(10.012f)
horizontalLineToRelative(9.399f)
verticalLineToRelative(-10.151f)
horizontalLineToRelative(-9.322f)
lineTo(198.726f, 128.19f)
lineToRelative(9.615f, 0.043f)
verticalLineToRelative(10.103f)
horizontalLineToRelative(8.807f)
lineToRelative(0.053f, 10.233f)
lineToRelative(9.216f, 0.046f)
verticalLineToRelative(9.569f)
lineToRelative(-9.259f, -0.043f)
lineToRelative(0.043f, -9.572f)
horizontalLineToRelative(-8.906f)
verticalLineToRelative(9.216f)
horizontalLineToRelative(-9.569f)
verticalLineToRelative(-9.17f)
lineToRelative(-10.634f, -0.089f)
lineToRelative(0.046f, -10.146f)
lineToRelative(-9.439f, -0.043f)
close()
moveTo(43.409f, 129.541f)
horizontalLineToRelative(9.394f)
verticalLineToRelative(10.146f)
lineToRelative(10.557f, 0.043f)
verticalLineToRelative(10.012f)
horizontalLineToRelative(9.399f)
lineTo(72.759f, 139.591f)
horizontalLineToRelative(-9.322f)
verticalLineToRelative(-10.05f)
lineToRelative(9.615f, 0.043f)
verticalLineToRelative(10.103f)
horizontalLineToRelative(8.807f)
lineToRelative(0.053f, 10.233f)
lineToRelative(9.216f, 0.046f)
verticalLineToRelative(9.569f)
lineToRelative(-9.259f, -0.043f)
lineToRelative(0.043f, -9.572f)
horizontalLineToRelative(-8.906f)
verticalLineToRelative(9.216f)
horizontalLineToRelative(-9.569f)
verticalLineToRelative(-9.17f)
lineToRelative(-10.634f, -0.089f)
lineToRelative(0.046f, -10.146f)
lineToRelative(-9.439f, -0.043f)
close()
}
}.build()
}
return customHashTagIconsCashu!!
}