Detail page: Play and Delete are one solid red (Shonar.Error fill, black ink) via new ShonarDangerFilledButton; verified pixel-identical fills on-device
This commit is contained in:
parent
81f9855c1f
commit
d0de0cc405
2 changed files with 28 additions and 2 deletions
|
|
@ -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;
|
* Selection pill (sort/show/filters/voices): ghost outline by default;
|
||||||
* selected = teal border + teal label + soft teal glow — the one place
|
* selected = teal border + teal label + soft teal glow — the one place
|
||||||
|
|
|
||||||
|
|
@ -719,7 +719,7 @@ fun DetailScreen(state: DesktopState) {
|
||||||
?.let(state::openDetail) },
|
?.let(state::openDetail) },
|
||||||
enabled = state.neighborOf(detail.file, forward = true) != null,
|
enabled = state.neighborOf(detail.file, forward = true) != null,
|
||||||
) { Text("Next →") }
|
) { Text("Next →") }
|
||||||
ShonarDangerButton(
|
ShonarDangerFilledButton(
|
||||||
{ confirmDelete = true },
|
{ confirmDelete = true },
|
||||||
enabled = detail.busy == null,
|
enabled = detail.busy == null,
|
||||||
) {
|
) {
|
||||||
|
|
@ -762,7 +762,7 @@ fun DetailScreen(state: DesktopState) {
|
||||||
Spacer(Modifier.weight(1f))
|
Spacer(Modifier.weight(1f))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ShonarOutlinedButton({ state.playFrom(detail.file) }) {
|
ShonarDangerFilledButton({ state.playFrom(detail.file) }) {
|
||||||
Icon(Icons.Filled.PlayArrow, contentDescription = null,
|
Icon(Icons.Filled.PlayArrow, contentDescription = null,
|
||||||
modifier = Modifier.size(Shonar.IconSm))
|
modifier = Modifier.size(Shonar.IconSm))
|
||||||
Spacer(Modifier.width(Shonar.Space2))
|
Spacer(Modifier.width(Shonar.Space2))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue