Prevent clipping of MPC playback state labels

This commit is contained in:
Dandaedre 2026-11-12 08:39:41 +01:00
parent 212deff99e
commit 3fc16e0849
2 changed files with 9 additions and 6 deletions

View File

@ -164,7 +164,8 @@ for custom buttons.
## Variables and custom feedback
The elapsed preset uses **ELAPSED** with size 14 text to avoid wrapping. The
playback-state preset displays **Playing**, **Paused**, **Stopped**, or **Idle**.
playback-state preset uses size 14 text to display **Playing**, **Paused**,
**Stopped**, or **Idle** without clipping.
These are connection/module variables, not button-local variables. With the
connection labelled `MPC_DEV`, use `$(MPC_DEV:remaining)` in button text.

View File

@ -86,11 +86,13 @@ export function presets(label = 'MPC_DEV') {
[{ feedbackId: 'progress_bar', options: {} }],
'14',
),
transport_state: button('Playback state', `$(${label}:state_label)`, null, [
active('playing', colors.green),
active('paused', colors.amber),
active('stopped', colors.red),
]),
transport_state: button(
'Playback state',
`$(${label}:state_label)`,
null,
[active('playing', colors.green), active('paused', colors.amber), active('stopped', colors.red)],
'14',
),
}
return { ...transport, ...catalog }
}