From d0de0cc405caec4de26bff7b29ffc130eb53be42 Mon Sep 17 00:00:00 2001 From: avi Date: Mon, 21 Sep 2026 17:13:24 -0500 Subject: [PATCH] Detail page: Play and Delete are one solid red (Shonar.Error fill, black ink) via new ShonarDangerFilledButton; verified pixel-identical fills on-device --- .../kotlin/com/shonar/desktop/Components.kt | 26 +++++++++++++++++++ .../main/kotlin/com/shonar/desktop/Screens.kt | 4 +-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/shonar/desktop/Components.kt b/app/src/main/kotlin/com/shonar/desktop/Components.kt index 62579cb..cf8d4ad 100644 --- a/app/src/main/kotlin/com/shonar/desktop/Components.kt +++ b/app/src/main/kotlin/com/shonar/desktop/Components.kt @@ -187,6 +187,32 @@ fun ShonarDangerButton( ) } +/** Solid destructive fill: one red, no transparency, black ink. + * Used for Play + Delete on the recording detail page (user directive: + * same solid red as the delete button, black text). */ +@Composable +fun ShonarDangerFilledButton( + onClick: () -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + content: @Composable RowScope.() -> Unit, +) { + Button( + onClick = onClick, + modifier = modifier.height(Shonar.ControlH).shonarFocus(Shonar.ShapeButton), + enabled = enabled, + shape = Shonar.ShapeButton, + elevation = null, + colors = ButtonDefaults.buttonColors( + containerColor = Shonar.Error, + contentColor = Color.Black, + disabledContainerColor = Shonar.SurfaceAlt, + disabledContentColor = Shonar.TextMuted, + ), + content = content, + ) +} + /** * Selection pill (sort/show/filters/voices): ghost outline by default; * selected = teal border + teal label + soft teal glow — the one place diff --git a/app/src/main/kotlin/com/shonar/desktop/Screens.kt b/app/src/main/kotlin/com/shonar/desktop/Screens.kt index 2fe6451..5cbdfcd 100644 --- a/app/src/main/kotlin/com/shonar/desktop/Screens.kt +++ b/app/src/main/kotlin/com/shonar/desktop/Screens.kt @@ -719,7 +719,7 @@ fun DetailScreen(state: DesktopState) { ?.let(state::openDetail) }, enabled = state.neighborOf(detail.file, forward = true) != null, ) { Text("Next →") } - ShonarDangerButton( + ShonarDangerFilledButton( { confirmDelete = true }, enabled = detail.busy == null, ) { @@ -762,7 +762,7 @@ fun DetailScreen(state: DesktopState) { Spacer(Modifier.weight(1f)) } } else { - ShonarOutlinedButton({ state.playFrom(detail.file) }) { + ShonarDangerFilledButton({ state.playFrom(detail.file) }) { Icon(Icons.Filled.PlayArrow, contentDescription = null, modifier = Modifier.size(Shonar.IconSm)) Spacer(Modifier.width(Shonar.Space2))