diff --git a/slab/menuband/Sources/MenuBand/InstrumentMapView.swift b/slab/menuband/Sources/MenuBand/InstrumentMapView.swift index 85d3a6c4fd..af5cfff8fc 100644 --- a/slab/menuband/Sources/MenuBand/InstrumentMapView.swift +++ b/slab/menuband/Sources/MenuBand/InstrumentMapView.swift @@ -302,17 +302,17 @@ final class InstrumentListView: NSView { cap.lineWidth = 1.4 cap.stroke() } else { - accent.withAlphaComponent(0.10).setFill() + accent.withAlphaComponent(0.30).setFill() cap.fill() - accent.withAlphaComponent(0.55).setStroke() - cap.lineWidth = 0.8 + accent.withAlphaComponent(0.85).setStroke() + cap.lineWidth = 1.0 cap.stroke() } let labelText = "0 MIDI OUT" let labelColor: NSColor = midiModeActive ? .white : .labelColor let labelAttrs: [NSAttributedString.Key: Any] = [ .font: NSFont.systemFont(ofSize: 10.5, weight: .semibold), - .foregroundColor: labelColor.withAlphaComponent(midiModeActive ? 1.0 : 0.85), + .foregroundColor: labelColor, .kern: 0.4, ] let str = NSAttributedString(string: labelText, attributes: labelAttrs) @@ -332,13 +332,13 @@ final class InstrumentListView: NSView { tint.withAlphaComponent(0.85).setFill(); cap.fill() tint.setStroke(); cap.lineWidth = 1.4; cap.stroke() } else { - tint.withAlphaComponent(0.10).setFill(); cap.fill() - tint.withAlphaComponent(0.55).setStroke(); cap.lineWidth = 0.8; cap.stroke() + tint.withAlphaComponent(0.30).setFill(); cap.fill() + tint.withAlphaComponent(0.85).setStroke(); cap.lineWidth = 1.0; cap.stroke() } let labelColor: NSColor = sampleBackendActive ? .white : .labelColor let str = NSAttributedString(string: "SAMPLE", attributes: [ .font: NSFont.systemFont(ofSize: 10.5, weight: .semibold), - .foregroundColor: labelColor.withAlphaComponent(sampleBackendActive ? 1.0 : 0.85), + .foregroundColor: labelColor, .kern: 0.4, ]) let size = str.size() @@ -361,8 +361,8 @@ final class InstrumentListView: NSView { teal.withAlphaComponent(0.85).setFill(); cap.fill() teal.setStroke(); cap.lineWidth = 1.4; cap.stroke() } else { - teal.withAlphaComponent(0.10).setFill(); cap.fill() - teal.withAlphaComponent(0.55).setStroke(); cap.lineWidth = 0.8; cap.stroke() + teal.withAlphaComponent(0.30).setFill(); cap.fill() + teal.withAlphaComponent(0.85).setStroke(); cap.lineWidth = 1.0; cap.stroke() } let attrs: [NSAttributedString.Key: Any] = [ .font: NSFont.systemFont(ofSize: 9, weight: .semibold), diff --git a/slab/menuband/Sources/MenuBand/PianoWaveformWindow/ExpandedPianoWaveformView.swift b/slab/menuband/Sources/MenuBand/PianoWaveformWindow/ExpandedPianoWaveformView.swift index 79b450d3c7..e1cca287d5 100644 --- a/slab/menuband/Sources/MenuBand/PianoWaveformWindow/ExpandedPianoWaveformView.swift +++ b/slab/menuband/Sources/MenuBand/PianoWaveformWindow/ExpandedPianoWaveformView.swift @@ -296,13 +296,13 @@ final class ExpandedPianoWaveformView: NSView { llmButton.translatesAutoresizingMaskIntoConstraints = false modeStack.addArrangedSubview(llmButton) let modeSpecs: [(label: String, image: NSImage?, tag: Int)] = [ - ("Notepat", + ("Default", NotepatFavicon.image - ?? NSImage(systemSymbolName: "keyboard", accessibilityDescription: "Notepat")? + ?? NSImage(systemSymbolName: "keyboard", accessibilityDescription: "Default")? .withSymbolConfiguration(modeSymbol), 0), - ("Conventional", - NSImage(systemSymbolName: "pianokeys", accessibilityDescription: "Conventional")? + ("AWSED", + NSImage(systemSymbolName: "pianokeys", accessibilityDescription: "AWSED")? .withSymbolConfiguration(modeSymbol), 1), ] @@ -336,6 +336,16 @@ final class ExpandedPianoWaveformView: NSView { gamepadToggle.translatesAutoresizingMaskIntoConstraints = false self.gamepadToggle = gamepadToggle modeStack.addArrangedSubview(gamepadToggle) + // "?" — why these layouts? Opens the keymaps paper (bundled PDF in + // Preview, or the hosted URL). Momentary, sits at the right of the row. + let whyButton = NSButton(title: "?", target: self, + action: #selector(openKeymapsPaper(_:))) + whyButton.bezelStyle = .recessed + whyButton.setButtonType(.momentaryPushIn) + whyButton.controlSize = .regular + whyButton.toolTip = "Why this layout? — open the keymaps paper" + whyButton.translatesAutoresizingMaskIntoConstraints = false + modeStack.addArrangedSubview(whyButton) contentStack.addArrangedSubview(modeStack) for label in [focusHintLabel, octaveHintLabel, layoutHintLabel] { label.font = NSFont.systemFont(ofSize: 10, weight: .bold) @@ -544,6 +554,19 @@ final class ExpandedPianoWaveformView: NSView { LLMGuideWindowController.show() } + /// "Why this layout?" — opens the keymaps paper: the bundled PDF (in + /// Preview, offline) if present, else the canonical hosted URL in the + /// browser. + @objc private func openKeymapsPaper(_ sender: NSButton) { + if let url = Bundle.appResources.url( + forResource: "keymaps-social-software-26-arxiv", withExtension: "pdf") { + NSWorkspace.shared.open(url) + } else if let url = URL( + string: "https://papers.aesthetic.computer/keymaps-social-software-26-arxiv.pdf") { + NSWorkspace.shared.open(url) + } + } + @objc private func gamepadSchemeChanged(_ sender: NSPopUpButton) { guard let raw = sender.selectedItem?.representedObject as? String, let scheme = GamepadControlScheme(rawValue: raw) else { return }