From 7cc3737f9297ff59063ea0fa8c73914b5ee0d546 Mon Sep 17 00:00:00 2001 From: avi Date: Mon, 21 Sep 2026 18:18:30 -0500 Subject: [PATCH] =?UTF-8?q?Detail=20page:=20Play=20and=20Delete=20match=20?= =?UTF-8?q?library=20Delete-1=20style=20=E2=80=94=20red-outline=20ghost=20?= =?UTF-8?q?buttons=20with=20white=20ink=20(ShonarDangerButton=20gains=20in?= =?UTF-8?q?k=20param;=20solid-filled=20variant=20removed)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/com/shonar/desktop/Components.kt | 33 +++---------------- .../main/kotlin/com/shonar/desktop/Screens.kt | 6 ++-- 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/app/src/main/kotlin/com/shonar/desktop/Components.kt b/app/src/main/kotlin/com/shonar/desktop/Components.kt index cf8d4ad..c44f712 100644 --- a/app/src/main/kotlin/com/shonar/desktop/Components.kt +++ b/app/src/main/kotlin/com/shonar/desktop/Components.kt @@ -165,12 +165,15 @@ fun ShonarGhostButton( ) } -/** Destructive action: quiet red outline — visible without shouting. */ +/** Destructive action: quiet red outline — visible without shouting. + * ink overrides the label/icon color (detail-page Play/Delete use + * TextPrimary = white-on-dark per user directive, Sep 21). */ @Composable fun ShonarDangerButton( onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, + ink: Color = Shonar.Error, content: @Composable RowScope.() -> Unit, ) { OutlinedButton( @@ -180,33 +183,7 @@ fun ShonarDangerButton( shape = Shonar.ShapeButton, border = BorderStroke(1.dp, Shonar.Error.copy(alpha = 0.5f)), colors = ButtonDefaults.outlinedButtonColors( - contentColor = Shonar.Error, - disabledContentColor = Shonar.TextMuted, - ), - content = content, - ) -} - -/** 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, + contentColor = ink, disabledContentColor = Shonar.TextMuted, ), content = content, diff --git a/app/src/main/kotlin/com/shonar/desktop/Screens.kt b/app/src/main/kotlin/com/shonar/desktop/Screens.kt index 5cbdfcd..5997322 100644 --- a/app/src/main/kotlin/com/shonar/desktop/Screens.kt +++ b/app/src/main/kotlin/com/shonar/desktop/Screens.kt @@ -719,9 +719,10 @@ fun DetailScreen(state: DesktopState) { ?.let(state::openDetail) }, enabled = state.neighborOf(detail.file, forward = true) != null, ) { Text("Next →") } - ShonarDangerFilledButton( + ShonarDangerButton( { confirmDelete = true }, enabled = detail.busy == null, + ink = Shonar.TextPrimary, ) { Text("Delete") } @@ -762,7 +763,8 @@ fun DetailScreen(state: DesktopState) { Spacer(Modifier.weight(1f)) } } else { - ShonarDangerFilledButton({ state.playFrom(detail.file) }) { + ShonarDangerButton({ state.playFrom(detail.file) }, + ink = Shonar.TextPrimary) { Icon(Icons.Filled.PlayArrow, contentDescription = null, modifier = Modifier.size(Shonar.IconSm)) Spacer(Modifier.width(Shonar.Space2))