deck: filter mod moves to FILTER ENV, cell runs centre in their reserves, two-segment toggles become single buttons, deck focuses its overlay

This commit is contained in:
2026-08-03 13:12:28 -04:00
parent 0eb2c67875
commit 450559f155
22 changed files with 885 additions and 504 deletions
+11 -12
View File
@@ -54,15 +54,14 @@ static void testRowsTileTheBandExactly() {
static void testToolbarRunIsOrderedRightToLeftWithoutOverlap() {
const Rect band = chromeBand();
const ChromeRects r = chromeRects(band, kKnob);
// Rightmost first: Browse, stereo, mono, velocity cell, preview, title.
// Rightmost first: Browse, channel, loop, velocity cell, preview, title.
CHECK(r.navBrowse.right() == band.right() - kPad);
CHECK(r.navBrowse.width == kNavButtonWidth);
CHECK(r.chanStereo.right() <= r.navBrowse.x);
CHECK(r.chanMono.right() == r.chanStereo.x);
CHECK(r.loopOn.right() <= r.chanMono.x); // the enable is immediately left of Mono|Stereo
CHECK(r.loopOff.right() == r.loopOn.x); // its two segments abut, like the channel pair
CHECK(r.loopOff.y == r.chanMono.y && r.loopOff.height == r.chanMono.height);
CHECK(r.velCell.right() <= r.loopOff.x);
CHECK(r.channel.right() <= r.navBrowse.x);
// Both are ONE button now, and they share the run's toggle baseline.
CHECK(r.loop.right() <= r.channel.x);
CHECK(r.loop.y == r.channel.y && r.loop.height == r.channel.height);
CHECK(r.velCell.right() <= r.loop.x);
CHECK(r.preview.right() <= r.velCell.x);
CHECK(r.bake.right() <= r.preview.x);
CHECK(r.bake.width == kBakeButtonWidth);
@@ -74,8 +73,8 @@ static void testToolbarRunIsOrderedRightToLeftWithoutOverlap() {
CHECK(r.title.width > 0);
// Every toolbar rect sits inside the toolbar row.
const Rect items[] = {r.title, r.holdCell, r.bake, r.preview, r.velCell, r.loopOff,
r.loopOn, r.chanMono, r.chanStereo, r.navBrowse};
const Rect items[] = {r.title, r.holdCell, r.bake, r.preview, r.velCell, r.loop,
r.channel, r.navBrowse};
for (const Rect& it : items) {
CHECK(it.y >= r.toolbar.y && it.bottom() <= r.toolbar.bottom());
}
@@ -88,8 +87,8 @@ static void testChromePartsNeverOverlapAtAnyWidth() {
// stay inside its own row, clear of every control.
CHECK(!overlaps(r.toolbar, r.rootStrip));
CHECK(r.rootStrip.y >= r.controls.y && r.rootStrip.bottom() <= r.controls.bottom());
const Rect items[] = {r.holdCell, r.bake, r.preview, r.velCell, r.loopOff, r.loopOn,
r.chanMono, r.chanStereo, r.navBrowse};
const Rect items[] = {r.holdCell, r.bake, r.preview, r.velCell, r.loop,
r.channel, r.navBrowse};
for (const Rect& it : items) {
CHECK(!overlaps(it, r.rootStrip));
CHECK(!overlaps(it, r.title));
@@ -176,7 +175,7 @@ static void testDegenerateBandYieldsNoInvertedRects() {
kKnob);
const Rect items[] = {tiny.title, tiny.holdCell, tiny.holdKnob, tiny.holdLabel,
tiny.bake, tiny.preview, tiny.velCell, tiny.velKnob, tiny.velLabel,
tiny.loopOff, tiny.loopOn, tiny.chanMono, tiny.chanStereo,
tiny.loop, tiny.channel,
tiny.navBrowse, tiny.rootStrip};
for (const Rect& it : items) CHECK(it.right() >= it.x && it.bottom() >= it.y);
}