Detail page: Play and Delete match library Delete-1 style — red-outline ghost buttons with white ink (ShonarDangerButton gains ink param; solid-filled variant removed)
This commit is contained in:
parent
d0de0cc405
commit
7cc3737f92
2 changed files with 9 additions and 30 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue