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.

(style) Redesign of Start Screen

Egor Khindikaynenabc8db50e8fb
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 04bac331..aa5760f9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -86,6 +86,9 @@ Entry categories: `Added`, `Changed`, `Fixed`, `Removed`.
copy, cut, paste, duplicate and delete. Each command is one undo step.
### Changed
+- **A new look for the start window.** The Nota logo follows the light and dark themes,
+ and recent projects sit in one compact list with their dates. Click a project to select
+ it and double-click to open it, or use the arrow keys and Return.
- **A new look for Settings.** The window is larger, and the sidebar groups its pages
under Devices, Plug-ins and General, each with an icon. Every page has a short
description under its title. MIDI inputs and the other on/off options use larger
@@ -97,6 +100,11 @@ Entry categories: `Added`, `Changed`, `Fixed`, `Removed`.
at the bottom of the window shows the plugin being installed, how much has downloaded and
a Cancel button. It stays in view while you scroll the list or open another page, and
shows the result when the install finishes. Cancelling leaves your plugins as they were.
+- **The Downloads list is faster and shows where each plugin runs.** Searching and filtering
+ the whole registry is instant now. Each plugin shows macOS, Windows and Linux icons for
+ the systems it's made for. Hover an icon to see which processors it supports. Plugins your
+ computer can't install are listed last, under their own heading, and say why. A progress
+ bar shows while the list loads or refreshes.
- "Add track" in a track's right-click menu puts the new track right after that track. On a
group it adds the track inside the group.
- Copying, duplicating or deleting a group now includes its tracks. Pasted tracks go after
diff --git a/src/managed/Nota.App/Controls/BrandMark.cs b/src/managed/Nota.App/Controls/BrandMark.cs
new file mode 100644
index 00000000..437fc9e8
--- /dev/null
+++ b/src/managed/Nota.App/Controls/BrandMark.cs
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.
+//
+// The Nota mark drawn as geometry, so it follows the Graphite / Paper variant: a raised
+// tile holding a knob — a 270° track, a brass arc over its first part and an Ink 1 needle.
+// Proportions come from the start-screen mockup (a 52-unit glyph set at 40 in a 56 tile).
+
+using System;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Media;
+
+namespace Nota.App;
+
+internal sealed class BrandMark : Control
+{
+ private const double TileSize = 56, TileRadius = 12, GlyphSize = 40, Units = 52;
+ private const double R = 17, Stroke = 5;
+ private const double StartDeg = 135, TrackSweep = 270, ValueSweep = 167.5, NeedleDeg = 32, NeedleLen = 16;
+
+ public BrandMark()
+ {
+ Width = TileSize;
+ Height = TileSize;
+ }
+
+ public override void Render(DrawingContext ctx)
+ {
+ var tile = new Rect(0.5, 0.5, TileSize - 1, TileSize - 1);
+ ctx.DrawRectangle(NotaPalette.SurfaceCard, new Pen(NotaPalette.BorderDefault, 1), new RoundedRect(tile, TileRadius));
+
+ double k = GlyphSize / Units;
+ var c = new Point(TileSize / 2, TileSize / 2);
+ double r = R * k;
+
+ ctx.DrawGeometry(null, RoundPen(NotaPalette.TrackOff, Stroke * k), Arc(c, r, StartDeg, TrackSweep));
+ ctx.DrawGeometry(null, RoundPen(NotaPalette.Accent, Stroke * k), Arc(c, r, StartDeg, ValueSweep));
+
+ // Needle: straight up from the centre, turned clockwise.
+ double a = (NeedleDeg - 90) * Math.PI / 180;
+ var tip = new Point(c.X + Math.Cos(a) * NeedleLen * k, c.Y + Math.Sin(a) * NeedleLen * k);
+ ctx.DrawLine(RoundPen(NotaPalette.TextPrimary, Stroke * k), c, tip);
+ }
+
+ private static Pen RoundPen(IBrush brush, double w) => new(brush, w) { LineCap = PenLineCap.Round };
+
+ // Clockwise arc in screen angles (0° = 3 o'clock).
+ private static StreamGeometry Arc(Point c, double r, double startDeg, double sweepDeg)
+ {
+ static Point At(Point c, double r, double deg)
+ {
+ double t = deg * Math.PI / 180;
+ return new Point(c.X + Math.Cos(t) * r, c.Y + Math.Sin(t) * r);
+ }
+ var g = new StreamGeometry();
+ using var s = g.Open();
+ s.BeginFigure(At(c, r, startDeg), false);
+ s.ArcTo(At(c, r, startDeg + sweepDeg), new Size(r, r), 0, sweepDeg > 180, SweepDirection.Clockwise);
+ s.EndFigure(false);
+ return g;
+ }
+}
diff --git a/src/managed/Nota.App/MainWindow.Welcome.cs b/src/managed/Nota.App/MainWindow.Welcome.cs
index 19559765..2479272f 100644
--- a/src/managed/Nota.App/MainWindow.Welcome.cs
+++ b/src/managed/Nota.App/MainWindow.Welcome.cs
@@ -70,7 +70,7 @@ public partial class MainWindow
if (string.IsNullOrWhiteSpace(path) || !Directory.Exists(path)) continue;
var name = Path.GetFileNameWithoutExtension(path.TrimEnd('/', '\\'));
string modified;
- try { modified = Directory.GetLastWriteTime(path).ToString("g"); }
+ try { modified = Directory.GetLastWriteTime(path).ToString("MM/dd/yyyy HH:mm", NotaNum.Culture); }
catch { modified = ""; }
items.Add(new RecentProjectItem(name, path, modified));
}
diff --git a/src/managed/Nota.App/NotaWindow.cs b/src/managed/Nota.App/NotaWindow.cs
index d09bc174..eed039ec 100644
--- a/src/managed/Nota.App/NotaWindow.cs
+++ b/src/managed/Nota.App/NotaWindow.cs
@@ -49,7 +49,7 @@ public abstract class NotaWindow : Window
ExtendClientAreaToDecorationsHint = true;
ExtendClientAreaTitleBarHeightHint = 36;
- var titleText = new TextBlock
+ var titleText = _chromeTitle = new TextBlock
{
Classes = { "Caption" },
HorizontalAlignment = HorizontalAlignment.Center,
@@ -70,7 +70,7 @@ public abstract class NotaWindow : Window
Grid.SetColumn(titleText, 1);
row.Children.Add(titleText);
- var bar = new Border
+ var bar = _chromeBar = new Border
{
Height = 36,
Background = Res("Brush.ChromeBg"),
@@ -88,6 +88,20 @@ public abstract class NotaWindow : Window
base.Content = dock;
}
+ private Border? _chromeBar;
+ private TextBlock? _chromeTitle;
+
+ /// <summary>Let the title bar dissolve into the body: no band colour, no hairline, no
+ /// title — only the traffic lights and the drag area remain. For launcher-style windows
+ /// whose body carries its own identity (the start screen).</summary>
+ protected void BlendTitleBar()
+ {
+ if (_chromeBar is null) return;
+ _chromeBar.Background = Brushes.Transparent; // still hit-tested, so it drags
+ _chromeBar.BorderThickness = default;
+ if (_chromeTitle is not null) _chromeTitle.IsVisible = false;
+ }
+
/// <summary>Set the window's body (below the title bar). Use this instead of Content.</summary>
protected void SetBody(Control body) => _bodyHost.Content = body;
diff --git a/src/managed/Nota.App/PreferencesWindow.Store.cs b/src/managed/Nota.App/PreferencesWindow.Store.cs
index 5ef0eb3d..9f00ec53 100644
--- a/src/managed/Nota.App/PreferencesWindow.Store.cs
+++ b/src/managed/Nota.App/PreferencesWindow.Store.cs
@@ -7,6 +7,10 @@
// progress and outcome show in a dock at the bottom of the window (visible from every
// pane), which also cancels it. After every change the catalog is rescanned so the
// browser lists the new plugins.
+//
+// The list is virtualized (only the rows in view exist), so filtering and searching the
+// whole registry stays instant. Plugins without a build for this computer sink to the end,
+// under their own heading.
using System;
using System.Collections.Generic;
@@ -16,6 +20,8 @@ using System.Threading.Tasks;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
+using Avalonia.Controls.Shapes;
+using Avalonia.Controls.Templates;
using Avalonia.Input;
using Avalonia.Layout;
using Avalonia.Media;
@@ -42,9 +48,17 @@ public sealed partial class PreferencesWindow
private CancellationTokenSource? _storeCts; // window lifetime
private CancellationTokenSource? _storeJobCts; // the running install; null when it can't be cancelled
private Task? _storeLoad;
+ private bool _storeLoading; // fetching the registry index
private ContentControl? _storeList; // null while another pane is showing
+ private ItemsControl? _storeItems; // the virtualized rows inside _storeList
private TextBlock[]? _storeCounts; // mono counts on the filter segments
private TextBlock? _storeStatus;
+ private Button? _storeRefresh;
+ private ProgressBar? _storeLoadBar; // over the list while a refresh runs
+
+ // List items: a plugin row, or the heading above the plugins this computer can't install.
+ private sealed record StoreEntry(StorePlugin Plugin, InstalledStorePlugin? Installed, bool First);
+ private sealed record StoreSection(string Title, int Count);
// The download dock (built once with the window).
private Border _dock = null!;
@@ -90,7 +104,8 @@ public sealed partial class PreferencesWindow
search.TextChanged += (_, _) => { _storeSearch = search.Text ?? ""; RenderStoreList(); };
var refresh = new Button { Content = "Refresh", Classes = { "ghost" }, Height = 30, FontSize = 12, Padding = new Thickness(12, 0), Foreground = TextSecondary };
ToolTip.SetTip(refresh, "Reload the registry");
- refresh.Click += (_, _) => _ = LoadStoreAsync(refresh: true);
+ refresh.Click += (_, _) => { if (!_storeLoading) _storeLoad = LoadStoreAsync(refresh: true); };
+ _storeRefresh = refresh;
var toolbar = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,*,Auto"), ColumnSpacing = 10 };
toolbar.Children.Add(new Border { Classes = { "segmented" }, Child = strip });
@@ -100,7 +115,9 @@ public sealed partial class PreferencesWindow
Grid.SetColumn(refresh, 2); toolbar.Children.Add(refresh);
_storeStatus = Caption("");
+ _storeLoadBar = new ProgressBar { IsIndeterminate = true, Height = 3, MinWidth = 0, IsVisible = false };
_storeList = new ContentControl();
+ _storeItems = StoreItems();
var body = new StackPanel
{
@@ -109,13 +126,13 @@ public sealed partial class PreferencesWindow
{
intro, toolbar,
_storeStatus,
- _storeList,
+ new StackPanel { Spacing = 6, Children = { _storeLoadBar, _storeList } },
Caption($"Installed to {_store.PluginsDir}"),
},
};
- body.DetachedFromVisualTree += (_, _) => { _storeList = null; _storeStatus = null; _storeCounts = null; };
- if (_storePlugins is null) EnsureStoreLoading();
- else RenderStoreList();
+ body.DetachedFromVisualTree += (_, _) => { _storeList = null; _storeItems = null; _storeStatus = null; _storeCounts = null; _storeRefresh = null; _storeLoadBar = null; };
+ EnsureStoreLoading();
+ RenderStoreList();
return body;
}
@@ -128,26 +145,85 @@ public sealed partial class PreferencesWindow
private async Task LoadStoreAsync(bool refresh)
{
- _storeMessage = "Loading the plugin registry…";
+ _storeLoading = true;
+ _storeMessage = null;
RenderStoreList();
try
{
_storePlugins = await _store.FetchAsync(refresh);
- _storeMessage = null;
}
catch (PluginStoreException e)
{
_storeMessage = e.Message;
}
+ finally { _storeLoading = false; }
RenderStoreList();
}
+ // The rows: an ItemsControl on a VirtualizingStackPanel. The panel follows its effective
+ // viewport, so it only realizes the rows in view even inside the pane's ScrollViewer.
+ private ItemsControl StoreItems() => new()
+ {
+ ItemsPanel = new FuncTemplate<Panel?>(() => new VirtualizingStackPanel()),
+ // -1 bottom: the last row's hairline slides under the table's own border (clipped).
+ Margin = new Thickness(0, 0, 0, -1),
+ DataTemplates =
+ {
+ new FuncDataTemplate<StoreEntry>((e, _) => e is null ? new Panel() : new Border
+ {
+ Background = RowBg, BorderBrush = Hairline, BorderThickness = new Thickness(0, e.First ? 0 : 1, 0, 0),
+ Child = StoreRow(e.Plugin, e.Installed),
+ }),
+ new FuncDataTemplate<StoreSection>((h, _) => h is null ? new Panel() : new Border
+ {
+ Background = Sunken, BorderBrush = Hairline, BorderThickness = new Thickness(0, 1, 0, 0), Padding = new Thickness(16, 9),
+ Child = new StackPanel
+ {
+ Orientation = Orientation.Horizontal, Spacing = 8,
+ Children =
+ {
+ new TextBlock { Text = h.Title, FontSize = 9, FontWeight = FontWeight.Bold, LetterSpacing = 1.1, Foreground = TextTertiary, VerticalAlignment = VerticalAlignment.Center },
+ new TextBlock { Text = h.Count.ToString(), FontSize = 9, FontFamily = NotaFonts.MonoFamily, Foreground = TextDisabled, VerticalAlignment = VerticalAlignment.Center },
+ },
+ },
+ }),
+ },
+ };
+
+ // The first registry load has nothing to show yet: a bar and a line in an empty table.
+ private Control StoreLoadingBlock() => Table(new List<Control>
+ {
+ new StackPanel
+ {
+ Spacing = 10, Margin = new Thickness(28, 36), HorizontalAlignment = HorizontalAlignment.Center,
+ Children =
+ {
+ new ProgressBar { IsIndeterminate = true, Width = 180, Height = 4, MinWidth = 0 },
+ new TextBlock { Text = "Loading the plugin registry…", FontSize = 12, Foreground = TextTertiary, HorizontalAlignment = HorizontalAlignment.Center },
+ },
+ },
+ });
+
+ private static string CurrentOsName =>
+ OperatingSystem.IsMacOS() ? "macOS" : OperatingSystem.IsWindows() ? "Windows" : OperatingSystem.IsLinux() ? "Linux" : "this computer";
+
private void RenderStoreList()
{
UpdateStoreBadge();
- if (_storeList is null) return;
+ if (_storeList is null || _storeItems is null) return;
UpdateStoreStatus();
- if (_storePlugins is null) { _storeList.Content = null; UpdateStoreCounts(null); return; }
+ if (_storeRefresh is not null)
+ {
+ _storeRefresh.IsEnabled = !_storeLoading;
+ _storeRefresh.Content = _storeLoading && _storePlugins is not null ? "Refreshing…" : "Refresh";
+ }
+ if (_storeLoadBar is not null) _storeLoadBar.IsVisible = _storeLoading && _storePlugins is not null;
+ if (_storePlugins is null)
+ {
+ _storeList.Content = _storeLoading ? StoreLoadingBlock() : null;
+ UpdateStoreCounts(null);
+ return;
+ }
var installed = _store.Installed.ToDictionary(i => i.Id);
UpdateStoreCounts(installed);
@@ -170,7 +246,26 @@ public sealed partial class PreferencesWindow
_storeList.Content = Table(new List<Control> { empty });
return;
}
- _storeList.Content = Table(shown.Select(p => StoreRow(p, installed.GetValueOrDefault(p.Id))).ToList());
+
+ // What this computer can install first; the rest after a heading, registry order kept.
+ var items = new List<object>(shown.Count + 1);
+ var available = shown.Where(p => p.Asset is not null).ToList();
+ var unavailable = shown.Where(p => p.Asset is null).ToList();
+ items.AddRange(available.Select((p, i) => new StoreEntry(p, installed.GetValueOrDefault(p.Id), First: i == 0)));
+ if (unavailable.Count > 0)
+ {
+ // The heading sits at the very top when nothing else matched — no rule above it then.
+ if (available.Count > 0) items.Add(new StoreSection("NOT AVAILABLE FOR THIS COMPUTER", unavailable.Count));
+ items.AddRange(unavailable.Select(p => new StoreEntry(p, installed.GetValueOrDefault(p.Id), First: false)));
+ }
+ if (available.Count == 0 && items[0] is StoreEntry first) items[0] = first with { First = true };
+ _storeItems.ItemsSource = items;
+ if (_storeList.Content is not Border { Tag: "store-table" })
+ _storeList.Content = new Border
+ {
+ Tag = "store-table", BorderBrush = Divider, BorderThickness = new Thickness(1), CornerRadius = NotaRadius.Panel,
+ ClipToBounds = true, Child = _storeItems,
+ };
}
private static bool MatchesFilter(StorePlugin p, int filter, IReadOnlyDictionary<string, InstalledStorePlugin> installed) => filter switch
@@ -285,6 +380,8 @@ public sealed partial class PreferencesWindow
private Control StoreRow(StorePlugin p, InstalledStorePlugin? inst)
{
+ // A plugin this computer can't install reads one Ink step down.
+ bool here = p.Asset is not null;
var text = new StackPanel
{
Spacing = 4,
@@ -294,12 +391,13 @@ public sealed partial class PreferencesWindow
{
Children =
{
- new TextBlock { Text = p.Name, FontSize = 13, FontWeight = FontWeight.SemiBold, Foreground = TextPrimary, Margin = new Thickness(0, 0, 8, 0), VerticalAlignment = VerticalAlignment.Center },
+ new TextBlock { Text = p.Name, FontSize = 13, FontWeight = FontWeight.SemiBold, Foreground = here ? TextPrimary : TextSecondary, Margin = new Thickness(0, 0, 8, 0), VerticalAlignment = VerticalAlignment.Center },
new TextBlock { Text = KindLabel(p.Kind), FontSize = 9, LetterSpacing = 0.7, FontFamily = NotaFonts.MonoFamily, Foreground = TextMuted, VerticalAlignment = VerticalAlignment.Center },
+ PlatformIcons(p.Platforms),
},
},
- new TextBlock { Text = $"{p.Developer} · {p.Version} · {p.License}", FontSize = 10, FontFamily = NotaFonts.MonoFamily, Foreground = TextTertiary },
- new TextBlock { Text = p.Description, FontSize = 12, LineHeight = 18, Foreground = TextSecondary, TextWrapping = TextWrapping.Wrap },
+ new TextBlock { Text = $"{p.Developer} · {p.Version} · {p.License}", FontSize = 10, FontFamily = NotaFonts.MonoFamily, Foreground = here ? TextTertiary : TextDisabled },
+ new TextBlock { Text = p.Description, FontSize = 12, LineHeight = 18, Foreground = here ? TextSecondary : TextTertiary, TextWrapping = TextWrapping.Wrap },
},
};
if (p.Notes is { Length: > 0 } notes)
@@ -313,7 +411,7 @@ public sealed partial class PreferencesWindow
}
else if (p.Asset is null)
{
- actions.Children.Add(new TextBlock { Text = "Not available for this computer", FontSize = 11, Foreground = TextTertiary, TextWrapping = TextWrapping.Wrap, Width = 110, TextAlignment = TextAlignment.Right, HorizontalAlignment = HorizontalAlignment.Right });
+ actions.Children.Add(new TextBlock { Text = UnavailableReason(p.Platforms), FontSize = 11, Foreground = TextTertiary, TextWrapping = TextWrapping.Wrap, Width = 110, TextAlignment = TextAlignment.Right, HorizontalAlignment = HorizontalAlignment.Right });
}
else if (inst is null)
{
@@ -378,6 +476,52 @@ public sealed partial class PreferencesWindow
return row;
}
+ // 24×24 filled marks for the three systems registry assets target.
+ private const string AppleIcon = "M12 7.2 C9.6 5.6 4.5 5.8 4.5 11.8 C4.5 16.6 7.4 21 9.3 21 C10.6 21 11 20.3 12 20.3 C13 20.3 13.4 21 14.7 21 C16.2 21 18.4 18.2 19.3 15.4 C17.6 14.7 16.6 13.2 16.6 11.5 C16.6 9.9 17.5 8.6 18.8 7.9 C17.2 6 14 5.9 12 7.2 Z M12.2 6.3 C12.2 4.3 13.6 2.8 15.6 2.7 C15.6 4.7 14.2 6.2 12.2 6.3 Z";
+ private const string WindowsIcon = "M3.5 3.5 H11 V11 H3.5 Z M13 3.5 H20.5 V11 H13 Z M3.5 13 H11 V20.5 H3.5 Z M13 13 H20.5 V20.5 H13 Z";
+ private const string LinuxIcon = "M12 2 C14 2 15.2 3.6 15.2 5.8 C15.2 7.4 14.5 8.2 15 9.4 C16.6 11.6 19 14.4 18.4 17.8 L19.8 21 H4.2 L5.6 17.8 C5 14.4 7.4 11.6 9 9.4 C9.5 8.2 8.8 7.4 8.8 5.8 C8.8 3.6 10 2 12 2 Z M12 10.2 C10.1 10.2 8.8 13 8.8 15.8 C8.8 18.3 10.2 19.8 12 19.8 C13.8 19.8 15.2 18.3 15.2 15.8 C15.2 13 13.9 10.2 12 10.2 Z";
+
+ // The systems a plugin ships for, as small marks with the architectures in the tooltip.
+ // This computer's system reads a step brighter than the others.
+ private static Control PlatformIcons(IReadOnlyList<string> keys)
+ {
+ var row = new StackPanel { Orientation = Orientation.Horizontal, Spacing = 6, Margin = new Thickness(10, 0, 0, 0), VerticalAlignment = VerticalAlignment.Center };
+ foreach (var (prefix, name, icon, current) in new[]
+ {
+ ("macos-", "macOS", AppleIcon, OperatingSystem.IsMacOS()),
+ ("windows-", "Windows", WindowsIcon, OperatingSystem.IsWindows()),
+ ("linux-", "Linux", LinuxIcon, OperatingSystem.IsLinux()),
+ })
+ {
+ var archs = keys.Where(k => k.StartsWith(prefix, StringComparison.Ordinal)).Select(k => ArchLabel(k[prefix.Length..])).Distinct().ToList();
+ if (archs.Count == 0) continue;
+ // "F1": even-odd fill, so the penguin's belly is a hole.
+ var mark = IconBox(new Path { Data = Geometry.Parse("F1 " + icon), Fill = current ? TextSecondary : TextTertiary }, 12);
+ var box = new Border { Background = Brushes.Transparent, Child = mark }; // hit-testable for the tooltip
+ ToolTip.SetTip(box, $"{name} · {string.Join(", ", archs)}");
+ row.Children.Add(box);
+ }
+ return row;
+ }
+
+ // Why a plugin has no asset here: no build for this system at all, or not for this CPU.
+ private static string UnavailableReason(IReadOnlyList<string> keys)
+ {
+ var os = CurrentOsName;
+ var prefix = os is "macOS" ? "macos-" : os.ToLowerInvariant() + "-";
+ if (!keys.Any(k => k.StartsWith(prefix, StringComparison.Ordinal))) return $"No {os} version";
+ var cpu = System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture == System.Runtime.InteropServices.Architecture.Arm64 ? "arm64" : "x64";
+ return $"No {os} version for {ArchLabel(cpu)}";
+ }
+
+ private static string ArchLabel(string arch) => arch switch
+ {
+ "universal" => "Apple silicon + Intel",
+ "arm64" => OperatingSystem.IsMacOS() ? "Apple silicon" : "ARM64",
+ "x64" => "x64",
+ _ => arch,
+ };
+
private static string KindLabel(string kind) => kind switch
{
"instrument" => "INSTRUMENT",
diff --git a/src/managed/Nota.App/WelcomeWindow.cs b/src/managed/Nota.App/WelcomeWindow.cs
index ab5c357c..c31c0ab4 100644
--- a/src/managed/Nota.App/WelcomeWindow.cs
+++ b/src/managed/Nota.App/WelcomeWindow.cs
@@ -1,8 +1,9 @@
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.
//
-// Welcome screen — the launcher shown on startup (see MainWindow.ShowWelcomeAsync).
-// Brand header, New / Open actions, a list of recent projects, and shortcuts to
+// Welcome screen — the launcher shown on startup (see MainWindow.ShowWelcomeAsync), as
+// drawn in nota-design/Nota Start.html. Brand header, New / Open actions, a list of
+// recent projects (click selects, double-click / Return opens, ↑ ↓ move), and shortcuts to
// Settings and What's New, plus banners for crash recovery and a newer release on
// GitHub. New / Open / a recent project close the launcher and hand
// off to the main window; Settings and What's New open as child dialogs so the user
@@ -14,8 +15,11 @@ using Avalonia;
using Avalonia.Controls;
using Avalonia.Layout;
using Avalonia.Media;
-using Avalonia.Media.Imaging;
-using Avalonia.Platform;
+using Avalonia.Animation;
+using Avalonia.Animation.Easings;
+using Avalonia.Data;
+using Avalonia.Input;
+using Avalonia.Threading;
using Microsoft.Extensions.DependencyInjection;
using Nota.Application;
@@ -41,48 +45,41 @@ public sealed class WelcomeWindow : NotaWindow
{
Title = "Welcome to Nota";
Width = 640;
- Height = 560; // + title-bar band
+ Height = 560; // including the title-bar band
CanResize = false;
WindowStartupLocation = WindowStartupLocation.CenterScreen;
- Background = NotaPalette.BgApp;
+ Background = NotaPalette.Panel;
+ BlendTitleBar();
+
+ _recent = recent;
+ _onOpenRecent = onOpenRecent;
var root = new Grid
{
- Margin = new Thickness(28, 20, 28, 24),
- RowDefinitions = new RowDefinitions("Auto,Auto,Auto,*,Auto"),
+ Margin = new Thickness(28, 12, 28, 20),
+ RowDefinitions = new RowDefinitions("Auto,Auto,*,Auto"),
};
// --- Brand header --------------------------------------------------
- var header = new Grid { ColumnDefinitions = new ColumnDefinitions("Auto,*") };
- var logo = new Image { Width = 56, Height = 56, VerticalAlignment = VerticalAlignment.Center };
- try
- {
- using var s = AssetLoader.Open(new Uri("avares://Nota.App/Assets/logo.png"));
- logo.Source = new Bitmap(s);
- }
- catch { /* decorative */ }
- Grid.SetColumn(logo, 0);
- header.Children.Add(logo);
-
- var brand = new StackPanel
- {
- Margin = new Thickness(16, 0, 0, 0),
- Spacing = 2,
- VerticalAlignment = VerticalAlignment.Center,
- };
+ var header = new StackPanel { Orientation = Orientation.Horizontal, Spacing = 16 };
+ header.Children.Add(new BrandMark { VerticalAlignment = VerticalAlignment.Center });
+ var brand = new StackPanel { Spacing = 6, VerticalAlignment = VerticalAlignment.Center };
brand.Children.Add(new TextBlock
{
Text = "Nota",
- FontSize = 26,
+ FontSize = NotaType.Title,
FontWeight = FontWeight.SemiBold,
- Foreground = NotaPalette.TextPrimary,
+ LetterSpacing = -0.4,
+ LineHeight = NotaType.Title,
+ Foreground = NotaPalette.TextHeading,
});
brand.Children.Add(new TextBlock
{
- Classes = { "Caption" },
Text = $"Version {AppInfo.Version} · Engine {App.Services.GetRequiredService<EngineBuildInfo>().Version} · Desktop DAW",
+ FontFamily = NotaFonts.MonoFamily,
+ FontSize = NotaType.Value,
+ Foreground = NotaPalette.TextMuted,
});
- Grid.SetColumn(brand, 1);
header.Children.Add(brand);
Grid.SetRow(header, 0);
root.Children.Add(header);
@@ -91,12 +88,12 @@ public sealed class WelcomeWindow : NotaWindow
var actions = new StackPanel
{
Orientation = Orientation.Horizontal,
- Spacing = 10,
- Margin = new Thickness(0, 24, 0, 20),
+ Spacing = 8,
+ Margin = new Thickness(0, 20, 0, 20),
};
- var newBtn = new Button { Content = "New project", Classes = { "primary" } };
+ var newBtn = new Button { Content = "New project", Classes = { "primary" }, FontWeight = FontWeight.SemiBold };
newBtn.Click += (_, _) => { Close(); onNew(); };
- var openBtn = new Button { Content = "Open project…", Classes = { "secondary" } };
+ var openBtn = new Button { Content = "Open project…" };
openBtn.Click += (_, _) => { Close(); onOpen(); };
actions.Children.Add(newBtn);
actions.Children.Add(openBtn);
@@ -104,75 +101,126 @@ public sealed class WelcomeWindow : NotaWindow
root.Children.Add(actions);
// --- Recent projects ----------------------------------------------
- var recentLabel = new TextBlock
+ var recentHead = new StackPanel { Orientation = Orientation.Horizontal, Spacing = 8, Margin = new Thickness(0, 0, 0, 8) };
+ recentHead.Children.Add(new TextBlock { Classes = { "SectionLabel" }, Text = "RECENT PROJECTS", VerticalAlignment = VerticalAlignment.Bottom });
+ recentHead.Children.Add(new TextBlock
{
- Classes = { "SectionLabel" },
- Text = "Recent projects",
- Margin = new Thickness(0, 0, 0, 8),
- };
- Grid.SetRow(recentLabel, 2);
- root.Children.Add(recentLabel);
+ Text = recent.Count.ToString(NotaNum.Culture),
+ FontFamily = NotaFonts.MonoFamily,
+ FontSize = NotaType.Eyebrow,
+ Foreground = NotaPalette.TextDisabled,
+ VerticalAlignment = VerticalAlignment.Bottom,
+ Margin = new Thickness(0, 0, 0, 1),
+ });
- Control recentBody;
+ Control wellBody;
if (recent.Count == 0)
{
- recentBody = new TextBlock
+ wellBody = new TextBlock
{
- Classes = { "Caption" },
- Text = "No recent projects yet — create one to get started.",
- VerticalAlignment = VerticalAlignment.Top,
+ Text = "No recent projects",
+ FontSize = NotaType.Body,
+ Foreground = NotaPalette.TextTertiary,
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Center,
};
}
else
{
- var list = new StackPanel { Spacing = 4 };
- foreach (var item in recent)
+ var list = new StackPanel();
+ for (int i = 0; i < recent.Count; i++)
{
- // Match New / Open: close the launcher, then hand off to the main window.
- list.Children.Add(RecentRow(item, p => { Close(); onOpenRecent(p); }));
+ var row = new RecentRow(recent[i]);
+ int index = i;
+ row.PointerPressed += (_, e) =>
+ {
+ if (!e.GetCurrentPoint(row).Properties.IsLeftButtonPressed) return;
+ Select(index);
+ if (e.ClickCount == 2) OpenRecent(index);
+ e.Handled = true;
+ };
+ _rows.Add(row);
+ list.Children.Add(row);
}
- recentBody = new ScrollViewer
+ wellBody = _scroll = new ScrollViewer
{
Content = list,
HorizontalScrollBarVisibility = Avalonia.Controls.Primitives.ScrollBarVisibility.Disabled,
};
+ Select(0);
}
- Grid.SetRow(recentBody, 3);
- root.Children.Add(recentBody);
+
+ var well = new Border
+ {
+ Background = NotaPalette.BgSunken,
+ BorderBrush = NotaPalette.GraphBorder,
+ BorderThickness = new Thickness(1),
+ CornerRadius = NotaRadius.Panel,
+ Padding = new Thickness(4),
+ ClipToBounds = true,
+ Child = wellBody,
+ };
+ well[!Border.BoxShadowProperty] = well.GetResourceObservable("Shadow.Sunken").ToBinding();
+
+ var recentPanel = new DockPanel();
+ DockPanel.SetDock(recentHead, Dock.Top);
+ recentPanel.Children.Add(recentHead);
+ recentPanel.Children.Add(well);
+ Grid.SetRow(recentPanel, 2);
+ root.Children.Add(recentPanel);
// --- Footer: show-on-startup + Settings / What's New --------------
var footer = new Grid
{
- Margin = new Thickness(0, 16, 0, 0),
- ColumnDefinitions = new ColumnDefinitions("*,Auto,Auto"),
+ Margin = new Thickness(0, 20, 0, 0),
+ ColumnDefinitions = new ColumnDefinitions("Auto,*,Auto,Auto"),
};
- var startupCheck = new CheckBox
+ var startupTrack = new SwitchTrack { IsOn = showOnStartup };
+ var startup = new Border
{
- Content = "Show on startup",
- IsChecked = showOnStartup,
+ Background = Brushes.Transparent,
+ Cursor = new Cursor(StandardCursorType.Hand),
VerticalAlignment = VerticalAlignment.Center,
+ Child = new StackPanel
+ {
+ Orientation = Orientation.Horizontal,
+ Spacing = 8,
+ Children =
+ {
+ startupTrack,
+ new TextBlock
+ {
+ Text = "Show on startup",
+ FontSize = NotaType.Body,
+ Foreground = NotaPalette.TextStrong,
+ VerticalAlignment = VerticalAlignment.Center,
+ },
+ },
+ },
+ };
+ startup.PointerPressed += (_, e) =>
+ {
+ if (!e.GetCurrentPoint(startup).Properties.IsLeftButtonPressed) return;
+ startupTrack.IsOn = !startupTrack.IsOn;
+ onShowOnStartupChanged(startupTrack.IsOn);
+ e.Handled = true;
};
- startupCheck.IsCheckedChanged += (_, _) => onShowOnStartupChanged(startupCheck.IsChecked == true);
- Grid.SetColumn(startupCheck, 0);
- footer.Children.Add(startupCheck);
+ Grid.SetColumn(startup, 0);
+ footer.Children.Add(startup);
- var settingsBtn = new Button { Content = "Settings", Classes = { "ghost" } };
+ var settingsBtn = FooterLink("Settings");
settingsBtn.Click += (_, _) => onSettings();
- Grid.SetColumn(settingsBtn, 1);
+ Grid.SetColumn(settingsBtn, 2);
footer.Children.Add(settingsBtn);
- var whatsNewBtn = new Button
- {
- Content = "What's New",
- Classes = { "ghost" },
- Margin = new Thickness(8, 0, 0, 0),
- };
+ var whatsNewBtn = FooterLink("What's New");
+ whatsNewBtn.Margin = new Thickness(8, 0, 0, 0);
whatsNewBtn.Click += (_, _) => onWhatsNew();
- Grid.SetColumn(whatsNewBtn, 2);
+ Grid.SetColumn(whatsNewBtn, 3);
footer.Children.Add(whatsNewBtn);
- Grid.SetRow(footer, 4);
+ Grid.SetRow(footer, 3);
root.Children.Add(footer);
// Banners (crash recovery, available update) stack above the content. The update
@@ -202,6 +250,57 @@ public sealed class WelcomeWindow : NotaWindow
SetBody(outer);
}
+ private readonly IReadOnlyList<RecentProjectItem> _recent;
+ private readonly Action<string> _onOpenRecent;
+ private readonly List<RecentRow> _rows = new();
+ private ScrollViewer? _scroll;
+ private int _selected = -1;
+ private bool _opening;
+
+ // ↑ / ↓ move the selection through the recent list, Return opens it.
+ protected override void OnKeyDown(KeyEventArgs e)
+ {
+ if (_rows.Count > 0 && !_opening)
+ {
+ switch (e.Key)
+ {
+ case Key.Down: Select(Math.Min(_rows.Count - 1, _selected + 1)); e.Handled = true; break;
+ case Key.Up: Select(Math.Max(0, _selected - 1)); e.Handled = true; break;
+ case Key.Enter: OpenRecent(_selected); e.Handled = true; break;
+ }
+ }
+ if (!e.Handled) base.OnKeyDown(e);
+ }
+
+ private void Select(int index)
+ {
+ if (index < 0 || index >= _rows.Count) return;
+ if (_selected >= 0) _rows[_selected].IsSelected = false;
+ _selected = index;
+ _rows[index].IsSelected = true;
+ _rows[index].BringIntoView();
+ }
+
+ // Mark the row "Opening…", let that frame land, then close the launcher and hand the
+ // project to the main window (loading blocks the UI thread).
+ private void OpenRecent(int index)
+ {
+ if (_opening || index < 0 || index >= _rows.Count) return;
+ _opening = true;
+ _rows[index].ShowOpening();
+ var path = _recent[index].Path;
+ Dispatcher.UIThread.Post(() => { Close(); _onOpenRecent(path); }, DispatcherPriority.Background);
+ }
+
+ // A quiet text button in the footer: Ink 3, a hover wash, no face.
+ private static Button FooterLink(string text) => new()
+ {
+ Content = text,
+ Classes = { "ghost" },
+ Padding = new Thickness(10, 0),
+ Foreground = NotaPalette.TextSecondary,
+ };
+
private readonly StackPanel _banners;
/// <summary>Show a "new version available" banner with a Download button that opens
@@ -280,51 +379,77 @@ public sealed class WelcomeWindow : NotaWindow
};
}
- // A clickable card for one recent project: name over its path, modified date on the
- // right. A ghost Button gives the standard hover wash for free.
- private static Button RecentRow(RecentProjectItem item, Action<string> onOpenRecent)
+ // One line of the recent list: name left, modified date right in mono. The selected
+ // row takes the brass wash and a 2px brass edge; hover washes the others.
+ private sealed class RecentRow : Border
{
- var text = new StackPanel { Spacing = 1, VerticalAlignment = VerticalAlignment.Center };
- text.Children.Add(new TextBlock
- {
- Text = item.Name,
- FontSize = 13,
- Foreground = NotaPalette.TextPrimary,
- TextTrimming = TextTrimming.CharacterEllipsis,
- });
- text.Children.Add(new TextBlock
- {
- Text = item.Path,
- FontSize = 11,
- Foreground = NotaPalette.TextTertiary,
- TextTrimming = TextTrimming.CharacterEllipsis,
- });
+ private readonly Border _edge;
+ private readonly TextBlock _name, _meta;
+ private bool _selected, _hover;
- var date = new TextBlock
+ public RecentRow(RecentProjectItem item)
{
- Text = item.Modified,
- FontSize = 11,
- Foreground = NotaPalette.TextTertiary,
- VerticalAlignment = VerticalAlignment.Center,
- Margin = new Thickness(12, 0, 0, 0),
- };
+ Height = 28;
+ CornerRadius = NotaRadius.Badge;
+ Padding = new Thickness(12, 0, 10, 0);
+ Transitions = new Transitions
+ {
+ new BrushTransition { Property = BackgroundProperty, Duration = TimeSpan.FromMilliseconds(120), Easing = new CubicEaseOut() },
+ };
+ ToolTip.SetTip(this, item.Path);
- var grid = new Grid { ColumnDefinitions = new ColumnDefinitions("*,Auto") };
- Grid.SetColumn(text, 0);
- Grid.SetColumn(date, 1);
- grid.Children.Add(text);
- grid.Children.Add(date);
+ _edge = new Border
+ {
+ Width = 2,
+ Margin = new Thickness(-12, 7, 0, 7),
+ CornerRadius = NotaRadius.Bar,
+ HorizontalAlignment = HorizontalAlignment.Left,
+ };
+ _name = new TextBlock
+ {
+ Text = item.Name,
+ FontSize = NotaType.Name,
+ FontWeight = FontWeight.Medium,
+ TextTrimming = TextTrimming.CharacterEllipsis,
+ VerticalAlignment = VerticalAlignment.Center,
+ };
+ _meta = new TextBlock
+ {
+ Text = item.Modified,
+ FontFamily = NotaFonts.MonoFamily,
+ FontSize = NotaType.Value,
+ VerticalAlignment = VerticalAlignment.Center,
+ Margin = new Thickness(12, 0, 0, 0),
+ };
+ var grid = new Grid { ColumnDefinitions = new ColumnDefinitions("*,Auto") };
+ Grid.SetColumn(_meta, 1);
+ grid.Children.Add(_name);
+ grid.Children.Add(_meta);
- var btn = new Button
+ var layer = new Panel();
+ layer.Children.Add(grid);
+ layer.Children.Add(_edge);
+ Child = layer;
+
+ PointerEntered += (_, _) => { _hover = true; Paint(); };
+ PointerExited += (_, _) => { _hover = false; Paint(); };
+ Paint();
+ }
+
+ public bool IsSelected { get => _selected; set { _selected = value; Paint(); } }
+
+ public void ShowOpening()
{
- Classes = { "ghost" },
- HorizontalAlignment = HorizontalAlignment.Stretch,
- HorizontalContentAlignment = HorizontalAlignment.Stretch,
- Padding = new Thickness(12, 8),
- Content = grid,
- };
- ToolTip.SetTip(btn, item.Path);
- btn.Click += (_, _) => onOpenRecent(item.Path);
- return btn;
+ _meta.Text = "Opening…";
+ _meta.Foreground = NotaPalette.AccentHover;
+ }
+
+ private void Paint()
+ {
+ Background = _selected ? NotaPalette.AccentSubtle : _hover ? NotaPalette.SurfaceRaised : NotaPalette.Wash(NotaPalette.SurfaceRaised, 0);
+ _edge.Background = _selected ? NotaPalette.Accent : null;
+ _name.Foreground = _selected ? NotaPalette.TextPrimary : NotaPalette.TextStrong;
+ _meta.Foreground = _selected ? NotaPalette.TextSecondary : NotaPalette.TextMuted;
+ }
}
}
diff --git a/src/managed/Nota.Application/Ports/IPluginStore.cs b/src/managed/Nota.Application/Ports/IPluginStore.cs
index aa116ce0..d1372651 100644
--- a/src/managed/Nota.Application/Ports/IPluginStore.cs
+++ b/src/managed/Nota.Application/Ports/IPluginStore.cs
@@ -21,6 +21,10 @@ public sealed record StorePlugin(
{
/// <summary>Optional caveat from the registry (e.g. "factory content is a separate download").</summary>
public string? Notes { get; init; }
+
+ /// <summary>Every asset key the newest version ships (e.g. macos-universal, windows-x64),
+ /// including platforms other than this one.</summary>
+ public IReadOnlyList<string> Platforms { get; init; } = [];
}
/// <summary>One downloadable release asset and the VST3 bundles inside it.</summary>
diff --git a/src/managed/Nota.Infrastructure/PluginStore/RegistryIndex.cs b/src/managed/Nota.Infrastructure/PluginStore/RegistryIndex.cs
index b6504421..7c34a2e6 100644
--- a/src/managed/Nota.Infrastructure/PluginStore/RegistryIndex.cs
+++ b/src/managed/Nota.Infrastructure/PluginStore/RegistryIndex.cs
@@ -84,6 +84,7 @@ public static class RegistryIndex
Asset: asset)
{
Notes = Str(p, "notes"),
+ Platforms = assets.EnumerateObject().Select(a => a.Name).ToList(),
};
}
diff --git a/tests/Nota.SmokeTest/PluginStoreTests.cs b/tests/Nota.SmokeTest/PluginStoreTests.cs
index 2a8d2a28..1df27105 100644
--- a/tests/Nota.SmokeTest/PluginStoreTests.cs
+++ b/tests/Nota.SmokeTest/PluginStoreTests.cs
@@ -50,6 +50,8 @@ internal static class PluginStoreTests
var mac = RegistryIndex.Parse(sample, ["macos-arm64", "macos-universal"]).Single();
yield return (mac.Asset is { Platform: "macos-universal", Archive: "dmg", Inner: "Dual.pkg" },
"…falling back along the platform keys (arm64 → universal), nested archive kept");
+ yield return (mac.Platforms.Order().SequenceEqual(["linux-x64", "macos-universal"]),
+ "…and lists every platform the version ships for");
yield return (RegistryIndex.Parse(sample, ["windows-x64"]).Single().Asset is null,
"a plugin without a build for this platform stays listed, with no asset");
var broken = sample.Replace("\"plugins\": [", "\"plugins\": [{\"id\": \"half\"},");