Use smaller text for full elapsed preset label
This commit is contained in:
parent
eb3d3c8b6b
commit
5c0cb31095
|
|
@ -103,7 +103,7 @@ would not preload it in MPC-HC and is not implemented here.
|
|||
|
||||
## Variables and custom feedback
|
||||
|
||||
The elapsed preset uses the compact label **ELAP.** to avoid wrapping. The
|
||||
The elapsed preset uses **ELAPSED** with size 14 text to avoid wrapping. The
|
||||
playback-state preset displays **Playing**, **Paused**, **Stopped**, or **Idle**.
|
||||
|
||||
These are connection/module variables, not button-local variables. With the
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ export function presets(label = 'MPC_DEV') {
|
|||
options: {},
|
||||
style: { bgcolor, color: colors.white, ...(text ? { text } : {}) },
|
||||
})
|
||||
const button = (name, text, id, feedback = []) => ({
|
||||
const button = (name, text, id, feedback = [], size = '18') => ({
|
||||
type: 'simple',
|
||||
name,
|
||||
style: { text, size: '18', color: colors.white, bgcolor: colors.dark, show_topbar: false },
|
||||
style: { text, size, color: colors.white, bgcolor: colors.dark, show_topbar: false },
|
||||
steps: [{ down: id ? [{ actionId: id, options: {} }] : [], up: [] }],
|
||||
feedbacks: [...feedback, offline],
|
||||
})
|
||||
|
|
@ -59,9 +59,13 @@ export function presets(label = 'MPC_DEV') {
|
|||
transport_remaining: button('Remaining time and progress', `LEFT\n$(${label}:remaining)`, null, [
|
||||
{ feedbackId: 'progress_bar', options: {} },
|
||||
]),
|
||||
transport_elapsed: button('Elapsed time and progress', `ELAP.\n$(${label}:elapsed)`, null, [
|
||||
{ feedbackId: 'progress_bar', options: {} },
|
||||
]),
|
||||
transport_elapsed: button(
|
||||
'Elapsed time and progress',
|
||||
`ELAPSED\n$(${label}:elapsed)`,
|
||||
null,
|
||||
[{ feedbackId: 'progress_bar', options: {} }],
|
||||
'14',
|
||||
),
|
||||
transport_state: button('Playback state', `$(${label}:state_label)`, null, [
|
||||
active('playing', colors.green),
|
||||
active('paused', colors.amber),
|
||||
|
|
|
|||
Loading…
Reference in New Issue