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.

(feat) The clip editor can fill the window; double-click a panel edge to reset it (#304 #305) (#392)

Chris Laupamab4ac5a809378
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bbe4d995..92fc7960 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,15 @@ Entry categories: `Added`, `Changed`, `Fixed`, `Removed`.
window**) moves it into the floating window for a second screen; the window's dock button
brings it back. Nota remembers whether the Mixer was shown, where and how tall, and restores
it on the next launch.
+- **The clip editor can fill the window** (#304): with a clip open in the Clip or Pattern tab,
+ the new button at the right of the detail panel's header, **View → Clip editor fills the
+ window** or ⌘⇧F (Ctrl+Shift+F) folds away the browser, the Arrangement / Session / Modular
+ view and a docked Mixer so the piano roll, audio editor or step grid gets the whole window.
+ The same button or key brings everything back at the heights it had.
+- **Double-click a panel edge to reset it** (#305): double-clicking the edge above the detail
+ panel sets it back to its default height (and the Clip tab forgets the height you dragged
+ it to); the browser's edge and the docked Mixer's top edge go back to their default sizes
+ the same way.
### Changed
- **Clip inspector and MIDI tools in two columns** (#276): in a short clip editor the
diff --git a/FEATURES.md b/FEATURES.md
index 06dd0a7c..8b099c61 100644
--- a/FEATURES.md
+++ b/FEATURES.md
@@ -1244,6 +1244,11 @@ audio effects after it keep running and keep their settings; saved with the proj
- **Devices/Clip panel in its own window** — the ⧉ button in the bottom panel's header
detaches it (the selected clip's piano roll on top, the device chain below, both at
once). The content moves across as-is: edits, meters and graphs all keep working live.
+- **Clip editor fills the window** — the expand button in the bottom panel's header (Clip
+ and Pattern tabs), View → Clip editor fills the window or ⌘⇧F / Ctrl+Shift+F folds away
+ the browser, the main view and a docked Mixer; the same again brings back the split.
+- **Panel edges** — drag to resize the browser, the docked Mixer and the bottom panel;
+ double-click an edge to reset that panel to its default size.
- **Popup rack editors** (full UI / Params).
- **Typed values** — ⌥-click any knob, fader or slider (or double-click the number next to
it) and type the value: "−6", "1.5k", "250 ms", "L 30", "1/16". Double-click the control
diff --git a/specs/056-detail-maximize/plan.md b/specs/056-detail-maximize/plan.md
new file mode 100644
index 00000000..fe646a8e
--- /dev/null
+++ b/specs/056-detail-maximize/plan.md
@@ -0,0 +1,111 @@
+# Implementation Plan: Clip editor fills the window; double-click a panel edge to reset it
+
+**Branch**: `cursor/detail-maximize-splitter-reset-bc46` | **Date**: 2026-10-30 | **Spec**: [spec.md](spec.md)
+
+**Input**: Feature specification from `/specs/056-detail-maximize/spec.md`
+
+## Summary
+
+Add a "fill the window" state to the docked Detail panel (#304) and a double-click reset on
+the panel edges (#305). Technically: one `_detailMaximized` flag in `MainWindow.Detail.cs`
+switches the `BodyGrid` rows (main row collapsed to 0 with its minimum lifted, Detail row
+star, docked-Mixer rows left out by `LayoutBottomPanels`) and hides `BrowserGrid`; leaving it
+restores the row from `_detailWanted` and re-lays the bottom panels through the existing
+specs/054 path. Double-clicks are caught in the tunnel phase on each splitter / edge and reset
+the remembered size. UI-only; no engine or ABI change.
+
+## Nota: Read Before Planning
+
+- **UI work** → [`DESIGN.md`](../../DESIGN.md) (Studio) and the `nota-design` skill: the
+ button is a ghost icon button in the existing Detail header row, before pop-out.
+- **Shortcut** → `nota-shortcuts` skill: catalog entry, menu binding, Settings → Shortcuts
+ row, docs shortcuts page.
+- **Anything** → [`CONTRIBUTING.md`](../../CONTRIBUTING.md).
+
+## Technical Context
+
+**Language/Version**: C# / .NET 10 (managed app only)
+
+**Primary Dependencies**: Avalonia (existing). No new dependency.
+
+**Storage**: none — the filled state is not saved; the reset clears the existing per-user
+Mixer dock height (`MixerDockHeight`) and the in-memory Clip-tab height.
+
+**Audio-Thread Impact**: None. Every change runs on the UI thread (grid rows, visibility,
+pointer handlers, a menu/catalog command). No engine source, C ABI, graph snapshot, JUCE
+or Transport code is touched; nothing new allocates, locks, logs or does I/O on the audio
+thread.
+
+**Testing**: `scripts/build-linux.sh` (smoke test, including the palette check that every
+catalog shortcut is bound and listed); the spec's scenarios driven headlessly against the
+real `MainWindow` with the nota-docs shots harness, with before/after screenshots.
+
+**Target Platform**: macOS, Windows, Linux desktop (built and tested here on Linux; CI
+builds all three).
+
+**Project Type**: desktop app
+
+**Performance Goals**: toggling only changes row definitions and visibility — no view is
+rebuilt or re-parented.
+
+**Constraints**: main view keeps its 120 px minimum whenever it is shown; Devices (fixed
+height) cannot fill the window; F11 full screen is independent.
+
+**Scale/Scope**: ~9 files in `src/managed/Nota.App`, 1 in `Nota.Application`.
+
+## Design
+
+| Concern | Where | Approach |
+|---|---|---|
+| Fill / back | `MainWindow.Detail.cs` `SetDetailMaximized` | Rows + `BrowserGrid` + splitter visibility; glyph, tooltip and menu tick follow |
+| Availability | `CanMaximizeDetail`, `MainWindow.Commands.cs` | Docked, visible, Clip / audio / Pattern content; otherwise status-line reason |
+| Leaving it | `ShowDetail`, panel hide, `SetView`, Toggle browser, `DockMixer` | Each calls `SetDetailMaximized(false)` (another clip keeps it) |
+| Layout | `LayoutBottomPanels`, `FitBottomPanels` | Mixer rows omitted while filled; fitting skipped while filled |
+| Double-click | `OnDoubleClick` (tunnel, `ClickCount == 2`, handled) | Detail splitter + `DetailEdge` → tab default; Mixer splitter → first-dock height; browser splitter → 344 |
+| Command | `CommandCatalog` `view.maximizeDetail`, ⌘⇧F | View menu `CheckBox` item via `app:Commands.Id` |
+| Icons | `Glyph` | `Expand` / `Shrink` path kinds |
+
+## Constitution Check
+
+| Principle | Status |
+|---|---|
+| I. Real-time audio safety | Pass — no audio-thread code touched |
+| II. Boundary discipline | Pass — no C ABI / JUCE / Transport change |
+| III. Licensing hygiene | Pass — no new dependency, no new source file |
+| IV. Verification gate | Pass — `scripts/build-linux.sh` before PR; no engine behaviour change, so no smoke-test extension |
+| V. One logical change | Pass — #304 and #305 are one change to the Detail separator (its size states), bundled at the maintainer's request |
+| VI. Docs in sync | Done — CHANGELOG `[Unreleased]`, FEATURES.md, Settings → Shortcuts, nota-docs detail-panel + shortcuts pages EN + RU (nota-docs#51) |
+| VII. Spec-first | Pass — spec, plan, tasks, converge |
+| VIII. Rules not weakened | Pass |
+
+## Project Structure
+
+### Documentation (this feature)
+
+```text
+specs/056-detail-maximize/
+├── spec.md
+├── plan.md
+└── tasks.md
+```
+
+### Source Code
+
+```text
+src/managed/
+├── Nota.App/
+│ ├── MainWindow.axaml # header button, View menu item
+│ ├── MainWindow.Detail.cs # filled state, double-click reset
+│ ├── MainWindow.Mixer.cs # DockMixer leaves it; Mixer edge reset
+│ ├── MainWindow.Browser.cs # browser default width, reset
+│ ├── MainWindow.axaml.cs # SetView leaves it
+│ ├── MainWindow.Menu.cs # Toggle browser leaves it
+│ ├── MainWindow.MenuKeys.cs # tooltip key spelling
+│ ├── MainWindow.Commands.cs # command binding
+│ ├── PreferencesWindow.cs # Settings → Shortcuts rows
+│ └── Controls/Glyph.cs # Expand / Shrink
+└── Nota.Application/Palette/CommandCatalog.cs
+```
+
+**Structure Decision**: existing managed app only; no new project, file or folder outside
+this spec.
diff --git a/specs/056-detail-maximize/spec.md b/specs/056-detail-maximize/spec.md
new file mode 100644
index 00000000..f69c67ca
--- /dev/null
+++ b/specs/056-detail-maximize/spec.md
@@ -0,0 +1,78 @@
+# Feature Specification: Clip editor fills the window; double-click a panel edge to reset it
+
+**Feature Branch**: `cursor/detail-maximize-splitter-reset-bc46`
+
+**Created**: 2026-10-30
+
+**Status**: Implemented
+
+**Input**: Issues nota-daw/nota#304 (a button and a shortcut that make the clip editor — the
+Detail panel's Clip / Pattern tab — fill the window, and toggle back) and #305 (double-click
+the separator between the arrangement and the clip editor to reset its default height).
+
+## Nota Context
+
+**Feature area**: UI (Avalonia, `src/managed/Nota.App`). No engine change.
+
+What exists today:
+
+- `BodyGrid` is `[main *] [mixer splitter, mixer]? [detail splitter, detail]`
+ (`MainWindow.Detail.cs`, specs/054). `ShowDetail(height, …)` sizes the Detail row per tab:
+ 250 for the piano roll and audio editor, 260 for Pattern, the card height for Devices
+ (not resizable). The Clip tabs remember a dragged height in `_detailHeight`; the asked-for
+ height is `_detailWanted`, which `FitBottomPanels` fits into the window.
+- With the Mixer docked the Detail panel is resized by `DetailEdge` instead of its
+ GridSplitter. The browser column and the docked Mixer have their own splitters.
+- View ▸ Toggle full screen (F11) already exists for the OS window.
+
+## User Scenarios
+
+1. **Fill the window (P1).** With a clip open in the Clip or Pattern tab, the new button at
+ the right of the Detail header (before pop-out), **View ▸ Clip editor fills the window**,
+ the palette command of that name or ⌘⇧F / Ctrl+Shift+F make the clip editor take the
+ whole body of the window: the browser, the Arrangement / Session / Modular view and a
+ docked Mixer fold away. The button turns into its "back" form and the menu item is ticked.
+2. **Back to the split (P1).** The same button, menu item or key brings back the browser,
+ the main view and the docked Mixer at the heights they had.
+3. **Reset by double-click (P1).** Double-clicking the edge above the Detail panel (the
+ splitter, or the edge under a docked Mixer) sets the panel back to its tab's default
+ height and forgets the height the Clip tab remembered.
+4. **Same on the other edges (P3).** Double-clicking the browser splitter resets the browser
+ to 344 px; double-clicking the docked Mixer's top edge forgets its dragged height and
+ docks it at the first-dock default again.
+
+## Decisions
+
+- "Fill the window" is inside the main window (#304's note), not OS full screen; the two
+ combine. It is not saved: a new launch opens on the split.
+- Only the Clip / Pattern tabs can fill the window — the Devices cards have a fixed height,
+ so the button is hidden on Devices (as the Pattern tab is hidden where it means nothing).
+- The shortcut is ⌘⇧F / Ctrl+Shift+F: free in every view and in the piano roll (which uses
+ ⇧F and ⌥⇧F), next to F11's full screen in Settings → Shortcuts.
+- Anything that asks to see the hidden parts goes back to the split: picking a view,
+ View ▸ Toggle browser, showing the Mixer docked, the Devices tab (also by Tab), closing,
+ hiding or popping out the panel. Opening another clip keeps the editor filling the window.
+
+## Requirements
+
+- **FR-1** Filling the window collapses the main row to 0 (its 120 px minimum lifted), hides
+ `BrowserGrid`, leaves the docked Mixer's rows out of the grid, and gives the Detail row
+ the rest (star). The Detail splitter / edge are hidden meanwhile.
+- **FR-2** Going back restores the Detail row from `_detailWanted` and re-lays the bottom
+ panels, so the Mixer gets `_mixerWanted` and the window fit applies as before.
+- **FR-3** `view.maximizeDetail` is in the command catalog (⌘⇧F), bound in
+ `MainWindow.Commands.cs`, unavailable in the palette unless a clip tab is shown docked
+ (or it is already filling the window); run from the menu or key otherwise it says why in
+ the status line.
+- **FR-4** A double-click on an edge is taken in the tunnel phase and handled, so no drag
+ starts and no old height is recorded afterwards.
+- **FR-5** Settings → Shortcuts lists ⌘⇧F and the double-click (the palette smoke test checks
+ every catalog shortcut is listed).
+
+## Success Criteria
+
+- Smoke test (palette: every catalog command bound and listed) passes.
+- Checked headlessly against the real `MainWindow` and demo song: fill / back through the
+ command and Ctrl+Shift+F, heights restored, double-click resets on the splitter and on the
+ Mixer-docked edge, a docked Mixer folded and restored, Devices / close go back to the split.
+- Before/after screenshots on `pr-assets`.
diff --git a/specs/056-detail-maximize/tasks.md b/specs/056-detail-maximize/tasks.md
new file mode 100644
index 00000000..1cb3871c
--- /dev/null
+++ b/specs/056-detail-maximize/tasks.md
@@ -0,0 +1,10 @@
+# Tasks: 056 Clip editor fills the window, edge double-click reset
+
+- [x] T1 `Glyph`: `Expand` / `Shrink` path kinds
+- [x] T2 Detail header button (`DetailMaximizeBtn`), View menu item, catalog command `view.maximizeDetail` (⌘⇧F)
+- [x] T3 `MainWindow.Detail.cs`: `SetDetailMaximized` (rows, browser, docked Mixer), `ShowDetail` keeps / leaves it, the panel hiding leaves it; `LayoutBottomPanels` / `FitBottomPanels` respect it
+- [x] T4 Leave it from `SetView`, View ▸ Toggle browser and `DockMixer`
+- [x] T5 Double-click reset: Detail splitter and edge (tab default, forget `_detailHeight`), Mixer top edge (forget the dock height), browser splitter (344)
+- [x] T6 Settings → Shortcuts rows, CHANGELOG, FEATURES
+- [x] T7 Smoke test; headless check of every scenario against the real window; before/after screenshots
+- [x] T8 nota-docs EN + RU (detail panel page, shortcuts page rows) — nota-docs#51
diff --git a/src/managed/Nota.App/Controls/Glyph.cs b/src/managed/Nota.App/Controls/Glyph.cs
index ae865b2c..1c3f2bb4 100644
--- a/src/managed/Nota.App/Controls/Glyph.cs
+++ b/src/managed/Nota.App/Controls/Glyph.cs
@@ -38,6 +38,7 @@ internal enum GlyphKind
Arrangement, Session, Modular, Keyboard, Sliders, Downloads, Star, StarFilled, Bookmark, Doc, Midi, Map, History, Sidebar, Options, Search, CaretRight, CaretDown, Levels, Gamepad, Phone, Plug, Library, Appearance, Shortcuts, MidiPort, Action, Track, Device, Preset, Patch, Loop, Speaker, SpeakerMute, SpeakerLow, SpeakerHigh, Metronome, Follow, Snap, Automation, Apple, Windows, Linux, ChainLink, Update,
Lock, LockOpen, // a reference (read-only) clip in the multi-clip editor, and the unlocked toggle
DockIn, // PopOut's opposite: bring a floating window back into the main one
+ Expand, Shrink, // a panel filling the window, and back to its split
}
internal sealed class Glyph : Control
@@ -524,6 +525,9 @@ internal sealed class Glyph : Control
// A padlock, shut and open: a clip locked as reference in the multi-clip editor (specs/029).
[GlyphKind.Lock] = ("M3.333 7.333 h9.333 v6.667 h-9.333 z M5.333 7.333 v-2 a2.667 2.667 0 0 1 5.333 0 v2", null),
[GlyphKind.LockOpen] = ("M3.333 7.333 h9.333 v6.667 h-9.333 z M5.333 7.333 v-2 a2.667 2.667 0 0 1 5.2 -0.8", null),
+ // Two arrows out to opposite corners (fill the window), and the same arrows turned in.
+ [GlyphKind.Expand] = ("M9.333 2.667 H13.333 V6.667 M13.333 2.667 L9.333 6.667 M6.667 13.333 H2.667 V9.333 M2.667 13.333 L6.667 9.333", null),
+ [GlyphKind.Shrink] = ("M13.333 2.667 L9.333 6.667 M9.333 3.333 V6.667 H12.667 M2.667 13.333 L6.667 9.333 M3.333 9.333 H6.667 V12.667", null),
[GlyphKind.ChainLink] = ("M2.711 5.619 L6.266 9.175 A2.057 2.057 0 0 0 9.175 6.266 L5.619 2.711 A2.057 2.057 0 0 0 2.711 5.619 ZM6.825 9.734 L10.381 13.289 A2.057 2.057 0 0 0 13.289 10.381 L9.734 6.825 A2.057 2.057 0 0 0 6.825 9.734 Z", null),
};
diff --git a/src/managed/Nota.App/MainWindow.Browser.cs b/src/managed/Nota.App/MainWindow.Browser.cs
index 1da88a43..374a00a8 100644
--- a/src/managed/Nota.App/MainWindow.Browser.cs
+++ b/src/managed/Nota.App/MainWindow.Browser.cs
@@ -26,8 +26,17 @@ public partial class MainWindow
{
private int _lastInstrumentTrackId;
+ private const double BrowserDefaultWidth = 344; // MainWindow.axaml's column width
+
// The browser column's width before it was folded to its rail, restored on unfold.
- private GridLength _browserWidth = new(344);
+ private GridLength _browserWidth = new(BrowserDefaultWidth);
+
+ // Double-clicking the splitter puts the column back at its default width.
+ private void ResetBrowserWidth()
+ {
+ _browserWidth = new GridLength(BrowserDefaultWidth);
+ BrowserGrid.ColumnDefinitions[0].Width = _browserWidth;
+ }
// Folded, the column hugs the rail and the splitter goes away — there's nothing to resize.
private void OnBrowserCollapsedChanged(bool collapsed)
diff --git a/src/managed/Nota.App/MainWindow.Commands.cs b/src/managed/Nota.App/MainWindow.Commands.cs
index a3e1105c..3969373c 100644
--- a/src/managed/Nota.App/MainWindow.Commands.cs
+++ b/src/managed/Nota.App/MainWindow.Commands.cs
@@ -73,6 +73,8 @@ public partial class MainWindow
B("view.connectPhone", ShowConnectPhone);
B("view.toggleBrowser", () => OnMenuToggleBrowser(this, e));
B("view.toggleDetail", () => OnMenuToggleClip(this, e));
+ B("view.maximizeDetail", ToggleDetailMaximized,
+ _ => Need(_detailMaximized || CanMaximizeDetail, "Open a clip in the clip editor first"));
B("view.showDevices", () => { int t = Timeline.SelectedTrackId > 0 ? Timeline.SelectedTrackId : LastInstrumentTrack(); if (t > 0) ShowDevices(t); },
c => Need(c.HasTrack, "Select a track first"));
B("view.popOutDetail", () => OnToggleDetailWindow(this, e));
diff --git a/src/managed/Nota.App/MainWindow.Detail.cs b/src/managed/Nota.App/MainWindow.Detail.cs
index 19eb040a..c8090aae 100644
--- a/src/managed/Nota.App/MainWindow.Detail.cs
+++ b/src/managed/Nota.App/MainWindow.Detail.cs
@@ -132,6 +132,15 @@ public partial class MainWindow
// and less clips them.
private void ShowDetail(double height, bool honorPersist, bool resizable = true)
{
+ _detailDefault = height;
+ // Filling the window, a clip tab keeps it; Devices goes back to the split.
+ if (_detailMaximized && resizable)
+ {
+ DetailPanel.IsVisible = true;
+ return;
+ }
+ SetDetailMaximized(false);
+ DetailMaximizeBtn.IsVisible = resizable;
var row = _detailRow;
row.MinHeight = 120;
double h = honorPersist && _detailHeight > 120 ? _detailHeight : height;
@@ -924,6 +933,7 @@ public partial class MainWindow
DetailPanel.PropertyChanged += (_, e) =>
{
if (e.Property != IsVisibleProperty) return;
+ if (!DetailPanel.IsVisible) SetDetailMaximized(false);
FollowDetailVisibility(DetailPanel.IsVisible);
SyncDetailEdge();
Dispatcher.UIThread.Post(FitBottomPanels);
@@ -932,6 +942,69 @@ public partial class MainWindow
DetailEdge.PointerPressed += OnDetailEdgePressed;
DetailEdge.PointerMoved += OnDetailEdgeMoved;
DetailEdge.PointerReleased += OnDetailEdgeReleased;
+ OnDoubleClick(DetailSplitter, ResetDetailHeight);
+ OnDoubleClick(DetailEdge, ResetDetailHeight);
+ OnDoubleClick(MixerSplitter, ResetMixerHeight);
+ OnDoubleClick(BrowserSplitter, ResetBrowserWidth);
+ }
+
+ // Double-click a panel edge: the panel goes back to its default size (#305). Taken in the
+ // tunnel and handled, so the splitter never starts the drag that would record the old size.
+ private static void OnDoubleClick(Control edge, Action reset)
+ => edge.AddHandler(PointerPressedEvent, (_, e) =>
+ {
+ if (e.ClickCount != 2 || !e.GetCurrentPoint(edge).Properties.IsLeftButtonPressed) return;
+ reset();
+ e.Handled = true;
+ }, RoutingStrategies.Tunnel);
+
+ // The tab's own height (ShowDetail's), forgetting the one the Clip tab remembered.
+ private void ResetDetailHeight()
+ {
+ if (_detailMaximized || !DetailPanel.IsVisible) return;
+ _detailHeight = 0;
+ _detailWanted = _detailDefault;
+ _detailRow.Height = new GridLength(_detailDefault);
+ FitBottomPanels();
+ }
+
+ // --- the clip editor filling the window (#304) --------------------------------------------
+ //
+ // The main view (browser and all) and a docked Mixer fold away and the Detail row takes the
+ // whole body; back, everything returns to the split it had (_detailWanted, _mixerWanted).
+ // Not saved: a new launch opens on the split.
+
+ private bool _detailMaximized;
+ private double _detailDefault = 250; // the shown tab's default height (ShowDetail)
+
+ private bool CanMaximizeDetail => !DetailFloating && DetailPanel.IsVisible
+ && DetailBody.Content is ClipEditorView or AudioClipEditorView or DrumPatternView;
+
+ private void OnDetailMaximize(object? sender, RoutedEventArgs e) => ToggleDetailMaximized();
+
+ private void ToggleDetailMaximized()
+ {
+ if (!_detailMaximized && !CanMaximizeDetail)
+ {
+ if (_vm is not null) _vm.StatusText = DetailFloating ? "The clip editor is in its own window" : "Open a clip in the clip editor first";
+ return;
+ }
+ SetDetailMaximized(!_detailMaximized);
+ }
+
+ private void SetDetailMaximized(bool on)
+ {
+ if (on == _detailMaximized) return;
+ _detailMaximized = on;
+ BrowserGrid.IsVisible = !on;
+ _mainRow.MinHeight = on ? 0 : 120;
+ _mainRow.Height = on ? new GridLength(0) : new GridLength(1, GridUnitType.Star);
+ _detailRow.Height = on ? new GridLength(1, GridUnitType.Star) : new GridLength(_detailWanted > 120 ? _detailWanted : _detailDefault);
+ DetailSplitter.IsVisible = !on;
+ DetailMaximizeGlyph.Kind = on ? GlyphKind.Shrink : GlyphKind.Expand;
+ ToolTip.SetTip(DetailMaximizeBtn, MenuKit.Keys(on ? "Back to the split (⌘⇧F)" : "Fill the window with the clip editor (⌘⇧F)"));
+ if (MenuItemFor("view.maximizeDetail") is { } mi) mi.IsChecked = on;
+ LayoutBottomPanels();
}
// Some paths only flip the panel's visibility (View ▸ Toggle detail panel, a closed clip):
@@ -1001,8 +1074,10 @@ public partial class MainWindow
rows.Clear();
rows.Add(_mainRow);
int detail = 1;
- if (_mixerDocked)
+ bool mixer = _mixerDocked && !_detailMaximized;
+ if (mixer)
{
+ _mixerRow.MinHeight = MixerPanelMin;
rows.Add(_mixerSplitRow);
rows.Add(_mixerRow);
Grid.SetRow(MixerSplitter, 1);
@@ -1019,8 +1094,8 @@ public partial class MainWindow
Grid.SetRow(DetailSplitter, detail);
Grid.SetRow(DetailPanel, detail + 1);
Grid.SetRow(DetailEdge, detail);
- MixerSplitter.IsVisible = _mixerDocked;
- MixerPanel.IsVisible = _mixerDocked;
+ MixerSplitter.IsVisible = mixer;
+ MixerPanel.IsVisible = mixer;
SyncDetailEdge();
FitBottomPanels();
}
@@ -1031,6 +1106,7 @@ public partial class MainWindow
// minimum. The Mixer grows back toward the height the user chose; a fit never changes it.
private void FitBottomPanels()
{
+ if (_detailMaximized) return; // the Detail row is all there is
double total = BodyGrid.Bounds.Height;
double mixer = _mixerDocked ? Math.Max(_mixerWanted, _mixerRow.MinHeight) : 0;
if (total > 0)
diff --git a/src/managed/Nota.App/MainWindow.Menu.cs b/src/managed/Nota.App/MainWindow.Menu.cs
index ffe1f177..44cc31c6 100644
--- a/src/managed/Nota.App/MainWindow.Menu.cs
+++ b/src/managed/Nota.App/MainWindow.Menu.cs
@@ -200,7 +200,11 @@ public partial class MainWindow
if (ActiveRoll() is { } roll && roll.DeleteSelection()) { _vm.StatusText = "Deleted notes"; return; }
if (Timeline.DeleteSelectedClips()) { _session?.Refresh(); _vm.StatusText = "Deleted clip(s)"; }
}
- private void OnMenuToggleBrowser(object? sender, EventArgs e) => Browser.IsVisible = !Browser.IsVisible;
+ private void OnMenuToggleBrowser(object? sender, EventArgs e)
+ {
+ if (_detailMaximized) { SetDetailMaximized(false); Browser.IsVisible = true; return; }
+ Browser.IsVisible = !Browser.IsVisible;
+ }
private void OnMenuToggleClip(object? sender, EventArgs e) => DetailPanel.IsVisible = !DetailPanel.IsVisible;
private void OnMenuToggleOverview(object? sender, EventArgs e)
{
diff --git a/src/managed/Nota.App/MainWindow.MenuKeys.cs b/src/managed/Nota.App/MainWindow.MenuKeys.cs
index 504ee7e1..c9696cfa 100644
--- a/src/managed/Nota.App/MainWindow.MenuKeys.cs
+++ b/src/managed/Nota.App/MainWindow.MenuKeys.cs
@@ -27,7 +27,7 @@ public partial class MainWindow
BindCommands();
ToolTip.SetTip(AutomationToggle, MenuKit.Keys("Show parameter-automation lanes (⌘⇧A)"));
// The XAML tips name the macOS keys; spell them Ctrl+… on Windows / Linux (#10).
- foreach (var c in new Control[] { RecordBtn, LoopRecordCell, MetronomeBtn })
+ foreach (var c in new Control[] { RecordBtn, LoopRecordCell, MetronomeBtn, DetailMaximizeBtn })
if (ToolTip.GetTip(c) is string tip) ToolTip.SetTip(c, MenuKit.Keys(tip));
if (NativeMenu.GetMenu(this) is not { } menu) return;
// macOS quits from the app menu (Quit Nota, ⌘Q); File → Exit is for Windows / Linux (#316).
diff --git a/src/managed/Nota.App/MainWindow.Mixer.cs b/src/managed/Nota.App/MainWindow.Mixer.cs
index 947fa61f..ee3a93e7 100644
--- a/src/managed/Nota.App/MainWindow.Mixer.cs
+++ b/src/managed/Nota.App/MainWindow.Mixer.cs
@@ -127,6 +127,7 @@ public partial class MainWindow
private void DockMixer()
{
if (_mixer is null) return;
+ SetDetailMaximized(false); // asked for, the Mixer must be seen
_mixer.View = MixerViewFromSettings();
SyncMixerViewButtons();
_mixerDocked = true;
@@ -169,6 +170,17 @@ public partial class MainWindow
settings.Save();
}
+ // Double-clicking its top edge forgets the dragged height: back to the first-dock default.
+ private void ResetMixerHeight()
+ {
+ if (!_mixerDocked) return;
+ var settings = MixerSettings;
+ settings.Current.MixerDockHeight = 0;
+ settings.Save();
+ _mixerWanted = DockedMixerHeight();
+ FitBottomPanels();
+ }
+
private void OnMixerMinHeightChanged()
{
if (_mixerDocked)
diff --git a/src/managed/Nota.App/MainWindow.axaml b/src/managed/Nota.App/MainWindow.axaml
index 7cec0bb1..4ea2361b 100644
--- a/src/managed/Nota.App/MainWindow.axaml
+++ b/src/managed/Nota.App/MainWindow.axaml
@@ -83,6 +83,7 @@
<NativeMenuItemSeparator/>
<NativeMenuItem Header="Toggle browser" app:Commands.Id="view.toggleBrowser"/>
<NativeMenuItem Header="Toggle detail panel" app:Commands.Id="view.toggleDetail"/>
+ <NativeMenuItem Header="Clip editor fills the window" app:Commands.Id="view.maximizeDetail" ToggleType="CheckBox"/>
<NativeMenuItem Header="Toggle overview" app:Commands.Id="view.toggleOverview"/>
<NativeMenuItem Header="Toggle sections" app:Commands.Id="view.toggleSections"/>
<NativeMenuItem Header="Toggle full screen" app:Commands.Id="view.fullscreen"/>
@@ -525,10 +526,10 @@
CornerRadius="{StaticResource Radius.Docked}">
<DockPanel>
<!-- Panel toolbar (32, seam under it): mode tabs · track chip (routing/PDC) ·
- Freeze · | · pop out · close -->
+ Freeze · | · fill the window (clip tabs) · pop out · close -->
<Border DockPanel.Dock="Top" Height="32" Background="{DynamicResource Brush.Panel}"
BorderBrush="{DynamicResource Brush.Seam}" BorderThickness="0,0,0,1">
- <Grid Margin="8,0,6,0" ColumnDefinitions="Auto,*,Auto,Auto,Auto,Auto">
+ <Grid Margin="8,0,6,0" ColumnDefinitions="Auto,*,Auto,Auto,Auto,Auto,Auto">
<Border Classes="segmented" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" Spacing="1">
<ToggleButton x:Name="DetailDevicesBtn" Classes="seg" Content="Devices" Click="OnDetailDevices"/>
@@ -583,12 +584,17 @@
</StackPanel>
<Border Grid.Column="3" Width="1" Height="16" Margin="10,0,6,0" VerticalAlignment="Center"
Background="{DynamicResource Brush.Rule}"/>
- <Button x:Name="DetailPopOut" Grid.Column="4" Classes="ghost" Height="22" Padding="6,0"
+ <Button x:Name="DetailMaximizeBtn" Grid.Column="4" Classes="ghost" Height="22" Margin="0,0,2,0" Padding="6,0"
+ Foreground="{DynamicResource Brush.TextTertiary}" Click="OnDetailMaximize" IsVisible="False"
+ ToolTip.Tip="Fill the window with the clip editor (⌘⇧F)">
+ <app:Glyph x:Name="DetailMaximizeGlyph" Kind="Expand"/>
+ </Button>
+ <Button x:Name="DetailPopOut" Grid.Column="5" Classes="ghost" Height="22" Padding="6,0"
Foreground="{DynamicResource Brush.TextTertiary}" Click="OnToggleDetailWindow"
ToolTip.Tip="Open devices and clip in a separate window">
<app:Glyph x:Name="PopOutGlyph" Kind="PopOut"/>
</Button>
- <Button Grid.Column="5" Classes="ghost" Height="22" Margin="2,0,0,0" Padding="6,0"
+ <Button Grid.Column="6" Classes="ghost" Height="22" Margin="2,0,0,0" Padding="6,0"
Foreground="{DynamicResource Brush.TextTertiary}" Click="OnCloseDetail" ToolTip.Tip="Close">
<app:Glyph x:Name="CloseDetailGlyph" Kind="Close"/>
</Button>
diff --git a/src/managed/Nota.App/MainWindow.axaml.cs b/src/managed/Nota.App/MainWindow.axaml.cs
index 4f3e3f2a..5a774b66 100644
--- a/src/managed/Nota.App/MainWindow.axaml.cs
+++ b/src/managed/Nota.App/MainWindow.axaml.cs
@@ -682,6 +682,7 @@ public partial class MainWindow : Window
private void SetView(MainView view)
{
if (_session is null || _modular is null) return;
+ SetDetailMaximized(false); // a view picked is a view to see
bool session = view == MainView.Session, modular = view == MainView.Modular;
Timeline.IsVisible = view == MainView.Arrangement;
_session.IsVisible = session;
diff --git a/src/managed/Nota.App/PreferencesWindow.cs b/src/managed/Nota.App/PreferencesWindow.cs
index 0a343ddc..f7399e85 100644
--- a/src/managed/Nota.App/PreferencesWindow.cs
+++ b/src/managed/Nota.App/PreferencesWindow.cs
@@ -1323,6 +1323,8 @@ public sealed partial class PreferencesWindow : NotaWindow
("Window", new[]
{
("F11", "Enter / leave full screen — the title bar hides in full screen"),
+ ("⌘⇧F", "The clip editor fills the window / back to the split it had"),
+ ("Double-click a panel edge", "Reset the detail panel, the Mixer or the browser to its default size"),
}),
("Command palette", new[]
{
diff --git a/src/managed/Nota.Application/Palette/CommandCatalog.cs b/src/managed/Nota.Application/Palette/CommandCatalog.cs
index 943ddadf..49376688 100644
--- a/src/managed/Nota.Application/Palette/CommandCatalog.cs
+++ b/src/managed/Nota.Application/Palette/CommandCatalog.cs
@@ -57,6 +57,7 @@ public static class CommandCatalog
C("view.connectPhone", "Connect phone…", "View", "", "remote mobile qr"),
C("view.toggleBrowser", "Toggle browser", "View", "", "library sidebar"),
C("view.toggleDetail", "Toggle detail panel", "View", "", "devices clip"),
+ C("view.maximizeDetail", "Clip editor fills the window", "View", Shortcut.CmdShift('F'), "maximize maximise full detail panel piano roll restore split"),
C("view.showDevices", "Show devices", "View", "", "chain detail"),
C("view.popOutDetail", "Open devices in a window", "View", "", "detach float pop out"),
C("view.toggleOverview", "Toggle overview", "View", "", "minimap", view: "Arrangement"),