Fix mapping-badge actor warnings; un-crowd the transport row
- MappingBadge.pcFill/ccFill/keyFill are marked nonisolated so the nonisolated MappingBadgeKind.fill can read them (a SwiftUI View's statics are otherwise main-actor-isolated). Clears three "actor-isolated ... from a nonisolated context" warnings. - The input-mute button pushed the docked desktop transport cluster past the row width, clipping the Rate picker and I/O steppers. Render the three rig toggles (Bypass / Mute / Input) icon-only there via .labelStyle(.iconOnly); the .help tooltips remain and the compact layout still shows text labels. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -42,9 +42,11 @@ enum MappingBadgeKind {
|
||||
/// One coloured pill — e.g. `CC11`, `PC3`, `⇧B` — marking a control's binding.
|
||||
struct MappingBadge: View {
|
||||
|
||||
static let pcFill: Color = Color(red: 0.11, green: 0.37, blue: 0.65)
|
||||
static let ccFill: Color = Color(red: 0.33, green: 0.29, blue: 0.72)
|
||||
static let keyFill: Color = Color(red: 0.73, green: 0.46, blue: 0.09)
|
||||
// `nonisolated` so the nonisolated `MappingBadgeKind.fill` can read them — a SwiftUI `View`'s
|
||||
// statics are otherwise main-actor-isolated. The values are immutable `Sendable` colours.
|
||||
nonisolated static let pcFill: Color = Color(red: 0.11, green: 0.37, blue: 0.65)
|
||||
nonisolated static let ccFill: Color = Color(red: 0.33, green: 0.29, blue: 0.72)
|
||||
nonisolated static let keyFill: Color = Color(red: 0.73, green: 0.46, blue: 0.09)
|
||||
|
||||
private static let fontSize: CGFloat = 9
|
||||
private static let paddingH: CGFloat = 5
|
||||
|
||||
Reference in New Issue
Block a user