refactor(ui): make widthUnits mean "base width in columns" + tidy overrides

Follow-up cleanup now that card width is content-derived. Redefine widthUnits
as the card's base width in knob columns (1 = 3-wide, 2 = 4-wide) — both the
knob-grid column count and the card's minimum width — with selector/switch rows
able to push wider. Values above 2 no longer do anything.

- Delete the now-misleading widthUnits 3/4 overrides on 11 amps; they inherit
  AmpVoicePedal's 2 (all full-surface amps → the same tight 4-wide card).
- Remove Mutant's redundant override (2 knobs + 2 switches → 3-wide either way).
- Cabinet: keep widthUnits 2 so it's 4-wide like the amps — its Cab/Mic/Mic B
  selector captions (voice names) need the room to stay readable (per request).
- Looper keeps widthUnits 3 (the one pedal still using the flat multiple for its
  bespoke timeline/knobs/transport layout).
- Refresh the widthUnits docs (base + AmpVoicePedal + Cabinet); update the amp
  tests' widthUnits assertions (3/4 → 2; Looper stays 3).

675 tests pass; no visual change to the amps, Cabinet now matches their width.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-05 09:05:40 -07:00
parent a1ce308082
commit 292261a088
26 changed files with 29 additions and 62 deletions
@@ -31,10 +31,6 @@ public final class MutantPedal: Pedal {
"Envelope-following auto-wah / funk filter that opens with your picking."
}
/// Double-width so the two switches — Sweep (2-way) and the 3-way Mode — sit side by side
/// without cramping now that switches lay out horizontally.
public override var widthUnits: Int { 2 }
// MARK: - Parameters
/// Filter response selector. `0` = lowpass, `1` = bandpass, `2` = highpass. Driven by a three-state switch.