1.1.1: move info button to top-left; fix empty-lane drag-drop
- PedalView: the ⓘ info button now sits under the top-left corner screw instead of on the name plate. - BoardFlowView: empty region lanes (Stereo Unzip / Split / Parallel) were nearly transparent, so their drop target had no hit area and releases landed on nothing. Add contentShape(Rectangle()) so the whole lane frame accepts drops. (Core lane append already worked — verified by existing API tests.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user