From bcb32e4f01c367d53425afe2ab4894162761041d Mon Sep 17 00:00:00 2001 From: avi Date: Fri, 18 Sep 2026 08:33:43 -0500 Subject: [PATCH] =?UTF-8?q?Detail=20playback=20row:=20drop=20the=20redunda?= =?UTF-8?q?nt=20Pause/Resume=20pill=20and=20the=20duplicate=20Stop=20text?= =?UTF-8?q?=20button=20=E2=80=94=20one=20filled=20Stop=20button,=20always?= =?UTF-8?q?=20present=20while=20playing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/kotlin/com/shonar/desktop/Screens.kt | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/app/src/main/kotlin/com/shonar/desktop/Screens.kt b/app/src/main/kotlin/com/shonar/desktop/Screens.kt index 0d32599..280579e 100644 --- a/app/src/main/kotlin/com/shonar/desktop/Screens.kt +++ b/app/src/main/kotlin/com/shonar/desktop/Screens.kt @@ -636,17 +636,14 @@ fun DetailScreen(state: DesktopState) { Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) { if (isPlaying) { - if (transport) { - OutlinedButton({ state.setPaused(!ps.paused) }) { - Text(if (ps.paused) "Resume" else "Pause") - } - } else { - Button({ state.stopPlayback() }) { - Icon(Icons.Filled.Stop, contentDescription = null, - modifier = Modifier.size(18.dp)) - Spacer(Modifier.width(6.dp)) - Text("Stop") - } + // One Stop control, always present (the pause/resume pill + // was redundant: Stop already ends playback, and the + // separate Stop text button duplicated it). + Button({ state.stopPlayback() }) { + Icon(Icons.Filled.Stop, contentDescription = null, + modifier = Modifier.size(18.dp)) + Spacer(Modifier.width(6.dp)) + Text("Stop") } if (transport && ps.durationSec > 0) { val dur = ps.durationSec @@ -663,7 +660,6 @@ fun DetailScreen(state: DesktopState) { color = MaterialTheme.colorScheme.primary) Spacer(Modifier.weight(1f)) } - TextButton({ state.stopPlayback() }) { Text("Stop") } } else { OutlinedButton({ state.playFrom(detail.file) }) { Icon(Icons.Filled.PlayArrow, contentDescription = null,