From 2c36de5c0d56a213045e5d4899dc7349a76036e5 Mon Sep 17 00:00:00 2001 From: Joshua Parmenter Date: Tue, 23 Jun 2026 21:29:25 -0700 Subject: [PATCH] Widen gap between knobs in short pedal rows Centred one- and two-knob rows now use a wider, touch-friendly inter-knob gap; full three-knob rows keep the tight spacing so they still fit the enclosure. Co-Authored-By: Claude Opus 4.8 --- Sources/LyrebirdShoeGazeUI/PedalView.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Sources/LyrebirdShoeGazeUI/PedalView.swift b/Sources/LyrebirdShoeGazeUI/PedalView.swift index 6ebcf74..b2e722b 100644 --- a/Sources/LyrebirdShoeGazeUI/PedalView.swift +++ b/Sources/LyrebirdShoeGazeUI/PedalView.swift @@ -187,6 +187,9 @@ public struct PedalView: View { private static let screwInset: CGFloat = 6 private static let knobColumnCount: Int = 3 private static let knobSpacing: CGFloat = 10 + /// Horizontal gap between knobs within a row. Wider than `knobSpacing` so centred + /// rows keep a comfortable, touch-friendly gap between adjacent knobs. + private static let knobRowItemSpacing: CGFloat = 24 /// Horizontal gap between adjacent vertical faders in the slider bank. private static let sliderBankSpacing: CGFloat = 4 /// Approximate per-fader footprint (matches `VerticalParameterSlider.controlWidth`), @@ -316,7 +319,12 @@ public struct PedalView: View { // Centre each row: a short row (one or two knobs) sits centred in the // enclosure rather than left-aligned. Symmetric spacers also centre a full // three-knob row, so every row stays horizontally centred. - HStack(spacing: PedalView.knobSpacing) { + // A full three-knob row keeps the tight spacing so it fits the enclosure; + // shorter centred rows use a wider, touch-friendly gap. + let rowItemSpacing: CGFloat = row.count >= PedalView.knobColumnCount + ? PedalView.knobSpacing + : PedalView.knobRowItemSpacing + HStack(spacing: rowItemSpacing) { Spacer(minLength: 0) ForEach(Array(row.enumerated()), id: \.offset) { knobPair in let knob: PedalKnob = knobPair.element