From 7bda12f047d88afd0ab80bc99dae28ebc54a5dd1 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 30 May 2026 00:24:24 +0000 Subject: [PATCH] fix(zap chip): outline the whole toggle, not the selected segment Reverts the per-segment selected outline. The real ask was a clearer mark for the entire 3-rail toggle: give the whole component a 1dp `outline` border so it reads as one control. The selected segment keeps its subtle primaryContainer thumb. https://claude.ai/code/session_01HNE2z7CSYZ2G8KwC5fziJn --- .../vitorpamplona/amethyst/ui/note/ReactionsRow.kt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt index f75c6edffe..45b21e625a 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/note/ReactionsRow.kt @@ -40,6 +40,7 @@ import androidx.compose.animation.shrinkHorizontally import androidx.compose.animation.slideInVertically import androidx.compose.animation.slideOutVertically import androidx.compose.animation.togetherWith +import androidx.compose.foundation.BorderStroke import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.background import androidx.compose.foundation.border @@ -2185,6 +2186,9 @@ private fun UnifiedZapAmountChip( Surface( shape = ButtonBorder, color = MaterialTheme.colorScheme.surfaceVariant, + // A clear outline around the whole component so it reads as one toggle + // control rather than a few loose icons. + border = BorderStroke(1.dp, MaterialTheme.colorScheme.outline), modifier = Modifier.padding(horizontal = 4.dp, vertical = 6.dp), ) { Row( @@ -2199,12 +2203,6 @@ private fun UnifiedZapAmountChip( targetValue = if (isSelected) MaterialTheme.colorScheme.primaryContainer else Color.Transparent, label = "zapRailThumb", ) - // A primary outline on the selected segment so the active state is - // unmistakable even where the container fill is close to the track. - val outline by animateColorAsState( - targetValue = if (isSelected) MaterialTheme.colorScheme.primary else Color.Transparent, - label = "zapRailOutline", - ) val send: () -> Unit = { when (rail) { ZapRail.CASHU -> onNutzap(amountInSats) @@ -2218,7 +2216,6 @@ private fun UnifiedZapAmountChip( Modifier .clip(RoundedCornerShape(percent = 50)) .background(thumb) - .border(1.5.dp, outline, RoundedCornerShape(percent = 50)) .combinedClickable( onClick = { if (isSelected) send() else selectedRail = rail }, onLongClick = onChangeAmount,