Skip to content

armgit / nota

Public Imported from GitHub
0

Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.

(fix) Fixed preset selection in devices

Egor Khindikaynenbac09034461b
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 30175cc4..42bc23b8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,11 @@ Entry categories: `Added`, `Changed`, `Fixed`, `Removed`.
(shortcut **F11**) enters and leaves full screen; on macOS the green button does it.
### Fixed
+- **The preset picker opens from anywhere on it:** the preset field in a device header only
+ responded to a click on the preset's name. The whole field opens the list again.
+- **The preset picker stays put:** a device's type and voice count (Consort's "DUO 1/2",
+ "POLY 12/16") now sit left of the preset picker, so the picker no longer shifts when the
+ count changes width.
- **Sample-pack presets open in the browser:** under Nota Mosaic → Packs, a pack wouldn't
expand, so its presets couldn't be seen or dragged. Packs now expand to their presets like
any other preset folder.
diff --git a/src/managed/Nota.App/DeviceCardKit.cs b/src/managed/Nota.App/DeviceCardKit.cs
index 3e2d7290..77c81be0 100644
--- a/src/managed/Nota.App/DeviceCardKit.cs
+++ b/src/managed/Nota.App/DeviceCardKit.cs
@@ -340,7 +340,8 @@ internal static class DeviceCardKit
DockPanel.SetDock(chevron, Dock.Right);
var name = new Border
{
- Width = nameWidth, Padding = new Thickness(7, 0, 6, 0), // NaN = stretch to the picker's width Background = Brushes.Transparent, Cursor = new Cursor(StandardCursorType.Hand),
+ Width = nameWidth, Padding = new Thickness(7, 0, 6, 0), // NaN = stretch to the picker's width
+ Background = Brushes.Transparent, Cursor = new Cursor(StandardCursorType.Hand), // the whole field is clickable, not just the text
Child = new DockPanel { Children = { chevron, label } },
};
ToolTip.SetTip(name, "Choose a preset");
diff --git a/src/managed/Nota.App/DeviceChainView.Shell.cs b/src/managed/Nota.App/DeviceChainView.Shell.cs
index 6e2e274f..4054c319 100644
--- a/src/managed/Nota.App/DeviceChainView.Shell.cs
+++ b/src/managed/Nota.App/DeviceChainView.Shell.cs
@@ -209,7 +209,9 @@ public sealed partial class DeviceChainView
}
// A compact (mini) card keeps the same picker — same list, same current preset — only narrower:
// the preset belongs to the device, not to the card size.
- if (presets.Count > 0) right.Children.Insert(0, PresetPicker(presets.Select(p => p.Name).ToList(), curPreset, extra.Preset, ApplyPreset, StepPreset,
+ // The picker sits right of the type badge: the badge's live voice count changes width
+ // (Consort's "DUO 1/2" → "POLY 12/16"), and on the left it would push the picker around.
+ if (presets.Count > 0) right.Children.Insert(right.Children.IndexOf(badge) + 1, PresetPicker(presets.Select(p => p.Name).ToList(), curPreset, extra.Preset, ApplyPreset, StepPreset,
nameWidth: s.Compact ? 74 : 132));
void Move(int to) { if (s.Kind == ChainKind.Midi) _engine.MoveMidiEffect(_trackId, di, to); else _engine.MoveDevice(_trackId, di, to); ExtrasMoved(s.Kind, di, to); Rebuild(); Changed?.Invoke(); }