fix(US-06): match preset buttons to web version
Four presets: 100 (slow), 120 (brisk), 130 (jog), 140 (push), each showing the BPM and label to match jeena.net/pacer/.
This commit is contained in:
parent
4fa725e4ed
commit
a9bde4ffc7
1 changed files with 21 additions and 8 deletions
|
|
@ -43,7 +43,12 @@ private val BG = Color(0xFF0D0D0D)
|
|||
private val GREEN = Green80
|
||||
private val GREEN_DIM = Color(0xFF004D14)
|
||||
|
||||
private val PRESETS = listOf(80, 100, 120, 130, 140, 160)
|
||||
private val PRESETS = listOf(
|
||||
100 to "slow",
|
||||
120 to "brisk",
|
||||
130 to "jog",
|
||||
140 to "push",
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun PacerScreen(viewModel: PacerViewModel, modifier: Modifier = Modifier) {
|
||||
|
|
@ -153,10 +158,10 @@ fun PacerScreen(viewModel: PacerViewModel, modifier: Modifier = Modifier) {
|
|||
modifier = Modifier.fillMaxWidth(),
|
||||
horizontalArrangement = Arrangement.SpaceEvenly
|
||||
) {
|
||||
PRESETS.forEach { preset ->
|
||||
PRESETS.forEach { (preset, label) ->
|
||||
OutlinedButton(
|
||||
onClick = { viewModel.updateBpm(preset) },
|
||||
modifier = Modifier.size(width = 52.dp, height = 36.dp),
|
||||
modifier = Modifier.size(width = 72.dp, height = 52.dp),
|
||||
contentPadding = androidx.compose.foundation.layout.PaddingValues(0.dp),
|
||||
colors = ButtonDefaults.outlinedButtonColors(
|
||||
contentColor = if (bpm == preset) BG else GREEN,
|
||||
|
|
@ -164,11 +169,19 @@ fun PacerScreen(viewModel: PacerViewModel, modifier: Modifier = Modifier) {
|
|||
),
|
||||
border = androidx.compose.foundation.BorderStroke(1.dp, GREEN.copy(alpha = 0.5f))
|
||||
) {
|
||||
Text(
|
||||
text = "$preset",
|
||||
fontSize = 13.sp,
|
||||
fontFamily = FontFamily.Monospace
|
||||
)
|
||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Text(
|
||||
text = "$preset",
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontFamily = FontFamily.Monospace
|
||||
)
|
||||
Text(
|
||||
text = label,
|
||||
fontSize = 10.sp,
|
||||
fontFamily = FontFamily.Monospace
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue