diff --git a/RELEASES.md b/RELEASES.md index 463ce31..e3ea9ed 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,5 +1,13 @@ # Releases +## 1.1.1 — 2026-06-26 + +### Fixes +- Pedal **ⓘ info button** moved to the top-left corner (under the corner screw), + out of the way of the name plate. +- Fixed **drag-and-drop into empty Stereo Unzip / Split / Parallel lanes** — an empty + lane is now fully hit-testable, so a dropped pedal registers instead of doing nothing. + ## 1.1.0 — 2026-06-24 ### New pedals diff --git a/Sources/LyrebirdShoeGazeUI/BoardFlowView.swift b/Sources/LyrebirdShoeGazeUI/BoardFlowView.swift index 5a49ba0..3962bce 100644 --- a/Sources/LyrebirdShoeGazeUI/BoardFlowView.swift +++ b/Sources/LyrebirdShoeGazeUI/BoardFlowView.swift @@ -325,6 +325,10 @@ public struct BoardFlowView: View { } } .frame(minWidth: BoardFlowView.laneMinWidth, alignment: .leading) + // Make the whole lane frame hit-testable: an empty lane is mostly transparent, so without + // this the drop target has almost no area and releases land on nothing (the bug where + // dropping into an empty Stereo Unzip / Split / Parallel lane did nothing). + .contentShape(Rectangle()) .overlay { dropOutline(active: dropTarget == laneID) } .dropDestination(for: String.self) { items, _ in handleLaneDrop(items, lane: lane) diff --git a/Sources/LyrebirdShoeGazeUI/PedalView.swift b/Sources/LyrebirdShoeGazeUI/PedalView.swift index 6c4c91c..eda0df1 100644 --- a/Sources/LyrebirdShoeGazeUI/PedalView.swift +++ b/Sources/LyrebirdShoeGazeUI/PedalView.swift @@ -216,8 +216,11 @@ public struct PedalView: View { private static let screwHalfSize: CGFloat = 4 private static let namePlateBackgroundOpacity: Double = 0.35 private static let fontSizeNamePlate: CGFloat = 13 - /// Opacity of the trailing ⓘ info button on the name plate. + /// Opacity of the ⓘ info button. private static let infoButtonOpacity: Double = 0.7 + /// Insets placing the ⓘ info button just under the top-left corner screw. + private static let infoButtonLeading: CGFloat = 5 + private static let infoButtonTop: CGFloat = 20 private static let outerBorderLineWidth: CGFloat = 1.5 private static let innerHighlightLineWidth: CGFloat = 1 private static let innerHighlightPadding: CGFloat = 1 @@ -283,6 +286,11 @@ public struct PedalView: View { // Corner screws — overlaid at the four corners screwCorners + + // Info button, tucked just under the top-left corner screw. + infoButton + .padding(.leading, PedalView.infoButtonLeading) + .padding(.top, PedalView.infoButtonTop) } .frame(width: enclosureWidth(for: sliders)) .shadow( @@ -299,7 +307,7 @@ public struct PedalView: View { // MARK: - Subviews - /// Capsule name plate near the top of the enclosure, with a trailing info button. + /// Capsule name plate near the top of the enclosure. private var namePlate: some View { Text(pedal.displayName) .font(.system(size: PedalView.fontSizeNamePlate, weight: .bold, design: .rounded)) @@ -308,18 +316,19 @@ public struct PedalView: View { .padding(.vertical, PedalView.namePlatePaddingV) .background(Color.black.opacity(PedalView.namePlateBackgroundOpacity)) .clipShape(RoundedRectangle(cornerRadius: PedalView.namePlateCornerRadius)) - .frame(maxWidth: .infinity) - .overlay(alignment: .trailing) { - Button { - showInfo = true - } label: { - Image(systemName: "info.circle") - .font(.system(size: PedalView.fontSizeNamePlate)) - .foregroundStyle(Color.white.opacity(PedalView.infoButtonOpacity)) - } - .buttonStyle(.plain) - .help("About this pedal") - } + } + + /// Info button tucked just under the top-left corner screw. + private var infoButton: some View { + Button { + showInfo = true + } label: { + Image(systemName: "info.circle") + .font(.system(size: PedalView.fontSizeNamePlate)) + .foregroundStyle(Color.white.opacity(PedalView.infoButtonOpacity)) + } + .buttonStyle(.plain) + .help("About this pedal") } /// Grid of the effect knobs, in rows of up to `knobColumnCount`.