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