fix: restore waveform symmetry about the midline, cut deck_values' link to the bank model, and unit-test the column arithmetic

The waveform column's vertical extents move to pure component_geometry so the shared
primitive stops being untested; PlaySeconds hoists into a header-only play_seconds target.
This commit is contained in:
2026-08-01 09:47:07 -04:00
parent 7f74b11dce
commit ca464397b2
17 changed files with 310 additions and 138 deletions
+4 -1
View File
@@ -8,6 +8,7 @@
// toolbar overlapping any other; degenerate bands yielding no inverted rects; and the preview
// button's play-triangle glyph, which sits inside the button without changing its rect.
#include "../src/core/instrument/ui/knob_deck.h"
#include "../src/core/instrument/ui/sample_bands.h"
#include "../src/core/instrument/ui/sample_chrome.h"
@@ -21,7 +22,9 @@ static int g_fail = 0;
#define CHECK(cond) do { if(!(cond)) { \
std::printf("FAIL line %d: %s\n", __LINE__, #cond); ++g_fail; } } while(0)
static constexpr int kKnob = 40; // stands in for knob_deck's kDeckKnobSize
// The real constant, not a copy: the shell passes kDeckKnobSize into chromeRects, and a
// hand-copied stand-in here had already drifted from it once.
static constexpr int kKnob = kDeckKnobSize;
static Rect chromeBand(int w = kEditorMinWidth, int h = kEditorMinHeight) {
return computeSampleBands(w, h, 120).chrome;