Skip to content

Say SLOT nn once, in the tab strip, where it is true for every tab - #155

Closed
AliceLafox wants to merge 4 commits into
fix/pattern-beat-lockfrom
feat/slot-in-tab-strip
Closed

AliceLafox wants to merge 4 commits into
fix/pattern-beat-lockfrom
feat/slot-in-tab-strip

Conversation

@AliceLafox

Copy link
Copy Markdown
Member

Closes #145. Stacked on #152 (fix/pattern-beat-lock), which reshaped the Rhythm pane first; the base moves to main once #152 is merged.

Properties and Rhythm each painted their own "SLOT nn" and reserved 76 px for it, Audio said it inside the player's title, History did not say it at all.

  • TabStrip gets a lead column (chosen at construction, so the Settings dialog's strip is untouched): a reserved width, always, holding "SLOT nn" in the panes' lilac, no hover, no underline, a divider after it; the offset comes off in one place for both the tab bounds and the hit test, so a click on the label selects nothing. With nothing selected the column is empty and the tabs stay where they are. A label that would not fit, or carries a line break, is refused rather than cut.
  • MainComponent sets the label from the same row the panes get (zero-padded number only, as decided) and clears it with the selection.
  • The panes give their labels up and take the 76 px back; the player's title is the name alone (the slot tab's audition drops the number too; the History window's audition keeps it, since it can play a take from another slot without changing the selection).

Tests: tab_strip_tests (196: lead-column geometry and hit test at every edge, every SLOT 01..99 fits, line breaks refused, plain mode unchanged). Non-GUI ctest 57/57; the six GUI harnesses 6/6 locally; a headless --snapshot --select 1 --properties on a fixture card shows "SLOT 01" ahead of the tabs and the Properties pane without its own label.

The studio answered "which slot am I looking at" four ways: Properties and
Rhythm each painted their own "SLOT nn" and each kept 76 px for it, Audio
said it inside the player's title, History said nothing (#145). The strip
is the one row every tab shares, so the label belongs there.

A strip built with TabStrip::Lead::label reserves the column at
construction, so the Settings dialog's strip is untouched and the tabs sit
where they sit whether or not a label is set. The column comes off the tab
bounds and the hit test in the one place, so a click on the label names no
tab. The label is drawn in the panes' lilac at the x their content starts,
with a divider after it and no hover or underline: a heading, not a fifth
tab. A label wider than the column is refused rather than cut: a number
shown short is a different number.

tab_strip_tests drives the geometry and the hit test headless, from what
the strip promises: the lead column names no tab and tells nobody, the
tabs do not move when the label comes and goes, drawn and hit agree at
every tab's edges, SLOT 99 fits and a longer label is refused, and the
plain strip behaves exactly as before.
… back

MainComponent writes the label where the panes get their slot and clears
it with them, so the strip and the panes can never name different slots.
The number alone: the name is editable in Properties and belongs with the
waveform. The player's title is now the name by itself, Properties' name
row and Rhythm's switch sentence start where the number used to be, and
History's slot is finally named, by the strip above it (#145).

The player harness hands the pane a name without a number, as the owner
now does.
The width check measures the first line only, so "SLOT\n12" passed it and
painted with the number out of sight below the row: cut after all, against
the refused-rather-than-cut contract. A label holding a carriage return or
a line feed is now refused with the same typed Error, wherever the break
sits, and the strip keeps the label it had.

tab_strip_tests runs every label the pedal can need, SLOT 01 to SLOT 99,
through the fit check: a platform font whose digits do not all fit the
column fails the suite, not the app.
…s it

The History tab's timeline is the selected slot's, so its auditions titled
the player "9 · Pushed · from the history" with a number the tab strip now
says above it. The title keeps only which take. The History window still
says the number: it lists every slot and auditions a take without changing
the selection, so the strip may be naming another slot while that take
plays — said in a comment where the title is made (#145).
@AliceLafox

Copy link
Copy Markdown
Member Author

Landed in main through #160 (merge commit d7cccff), which carries this PR's own merge commit; GitHub refuses to retarget a head that main already contains, so closing by hand.

@AliceLafox AliceLafox closed this Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant