Zoom the text of the log, check, available and bandmap windows

Ctrl+wheel and Ctrl+plus / Ctrl+minus change the text size of the
window in front, and Ctrl+0 puts it back. Each size is kept in the
settings file.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 11:37:35 +00:00
co-authored by Claude Sonnet 5.5
parent 0b2f8e2820
commit 45040dff83
7 changed files with 126 additions and 14 deletions
+19
View File
@@ -1,3 +1,4 @@
using Nonemm.App.Configuration;
using System.Collections.ObjectModel;
using Avalonia;
using Avalonia.Collections;
@@ -63,9 +64,27 @@ public sealed partial class LogWindow : RefreshableWindow
};
Colour(Rows);
Colour(Earlier);
ApplyFontSize();
_ = new FontZoom(this, new Settings().LogFontSize, () => session.Settings.LogFontSize, size =>
{
session.Save(session.Settings with { LogFontSize = size });
ApplyFontSize();
builtFor = "";
Refresh();
});
Refresh();
}
/// The cells take their size from the `LogFontSize` resource, and the
/// grids need it too because the column widths are measured from it.
private void ApplyFontSize()
{
double size = session.Settings.LogFontSize;
Resources["LogFontSize"] = size;
Rows.FontSize = size;
Earlier.FontSize = size;
}
/// What the operator picked. The grid raises this for the picks this window
/// makes as well, and those are already known.
private void RememberPicked(object? sender, SelectionChangedEventArgs e)