L4: re-home dock-panel buttons into three zones

Top toolbar = capture+placement, bottom toolbar = Design-View verbs, footer = narrow Arrange|Design toggle + count + Tail button + set-apart Prune. New pure footer_bar module; Tail is now a real kit button.
This commit is contained in:
2026-07-26 22:42:56 -04:00
parent 7dd9de14df
commit 8f4a84ac79
7 changed files with 817 additions and 278 deletions
+23 -18
View File
@@ -13,14 +13,16 @@
//
// -- Placement contract --------------------------------------------------------
//
// The footer already hosts a LEFT-aligned tail-mode label and a RIGHT-aligned
// version readout (bank_panel drawTailFooter). The prune button is a fixed-width
// button anchored to the RIGHT of the footer, inset from the right edge, sitting
// just LEFT of the version readout's inset region. It never overlaps the tail label
// at the left. When the footer is too narrow to fit the button without colliding
// with the left inset, the button is suppressed (empty rect) rather than drawn on
// top of the label — the action is always reachable via its bindable command, so a
// hidden button is a graceful degradation, not a lost affordance.
// The footer hosts (L4) a LEFT group — the [Arrange|Design] mode toggle, a per-mode
// count, and the Tail button (bank_panel footer_bar) — and a RIGHT-aligned version
// readout (bank_panel drawFooter). The prune button is a fixed-width button anchored
// to the RIGHT of the footer, inset from the right edge, sitting just LEFT of the
// version readout's inset region and set APART from the benign left group. It never
// overlaps the left group (footer_bar reserves rightReserve px at the right to match).
// When the footer is too narrow to fit the button without colliding with the left
// inset, the button is suppressed (empty rect) rather than drawn on top — the action
// is always reachable via its bindable command, so a hidden button is a graceful
// degradation, not a lost affordance.
namespace reasampler {
@@ -59,21 +61,24 @@ struct ButtonRect {
// * buttonWidth — the button's fixed width.
// * rightInset — gap from the footer's right edge to the button's right edge (the
// button sits left of this inset, clearing the right-aligned version
// readout). COUPLED TO drawTailFooter (bank_panel.cpp): the version
// readout uses `vrc.right -= 8` (8 px right margin). The button's
// right edge lands at footer.right - 84, i.e. 76 px left of the
// readout's right margin — enough clearance for the ~10-char label.
// If the version readout's inset changes in drawTailFooter, update
// this value to maintain clearance.
// readout). COUPLED TO drawFooter (bank_panel.cpp): the version readout
// uses an 8 px right margin. The button's right edge lands at
// footer.right - 84, i.e. 76 px left of the readout's right margin —
// enough clearance for the ~10-char label. ALSO COUPLED to
// FooterBarSpec::rightReserve (footer_bar.h): the L4 footer-left group
// (mode toggle + count + Tail) reserves that many px at the right so it
// never runs under this button; rightReserve must exceed rightInset +
// buttonWidth. If the version readout's inset changes in drawFooter,
// update this value to maintain clearance.
// * verticalInset — top/bottom gap inside the footer (the button is shorter than the
// strip so it reads as a raised control, not a full-height fill).
// * minLeftInset — the button's left edge must stay at least this far from the footer
// left edge (reserving room for the left-aligned tail label). If the
// button would encroach past this, computePruneButton yields an empty
// rect (button suppressed — see header placement contract).
// left edge (reserving room for the L4 footer-left group). If the button
// would encroach past this, computePruneButton yields an empty rect
// (button suppressed — see header placement contract).
struct PruneButtonSpec {
int buttonWidth = 72;
int rightInset = 84; // COUPLED: version readout in drawTailFooter uses vrc.right -= 8
int rightInset = 84; // COUPLED: version readout in drawFooter uses an 8 px right margin
int verticalInset = 4;
int minLeftInset = 120;
};