Public Access
Give hosts and terminals their own screen, and the rest of the vault another
Rebuilds the client's shell from an imported design: a titlebar and nav rail it draws itself, real multi-session tabs over the one WebView, a Ctrl+K host search, and a vault screen that merges keys, passwords and pinned host keys into one table. Hosts left the vault column for their own screen beside the terminal, which is what the design asks for and turned out to be the better split anyway. Two screens the design shows have nothing behind them yet — file transfer and teams — and say so plainly rather than rendering invented data; every other gap between the design and this build is recorded in docs/design-import-gaps.md.
This commit is contained in:
@@ -31,27 +31,35 @@ internal static class LayoutHarness
|
||||
/// two constants still match the XAML, so the harness cannot quietly start measuring a window larger
|
||||
/// than the one a user is allowed to drag to.
|
||||
/// </remarks>
|
||||
internal const double MinimumWidth = 820;
|
||||
internal const double MinimumWidth = 880;
|
||||
|
||||
/// <inheritdoc cref="MinimumWidth" />
|
||||
internal const double MinimumHeight = 520;
|
||||
internal const double MinimumHeight = 560;
|
||||
|
||||
/// <summary>The vault column's fixed width, from <c>MainWindow</c>'s <c>ColumnDefinitions</c>.</summary>
|
||||
internal const double VaultColumnWidth = 340;
|
||||
/// <summary>The host sidebar's fixed width, from the hosts screen's <c>ColumnDefinitions</c>.</summary>
|
||||
internal const double HostSidebarWidth = 268;
|
||||
|
||||
/// <summary>The nav rail's fixed width, from <c>NavRail.axaml</c>.</summary>
|
||||
internal const double NavRailWidth = 54;
|
||||
|
||||
/// <summary>
|
||||
/// What the account bar takes off the top before the column gets any height at all.
|
||||
/// What the titlebar and the status bar take off the window before any screen gets a pixel.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The bar is <c>Padding="12,8"</c> around a row whose tallest child is a themed <see cref="Button"/>, so
|
||||
/// its height is the button's plus sixteen. Stated as a constant with a test holding the button to
|
||||
/// thirty-two rather than measured from the bar itself, because measuring the bar would mean showing
|
||||
/// <c>MainWindow</c>, and that cannot be done here at all — see the harness's own tests.
|
||||
/// Both are fixed heights declared in their own markup — 38 and 24 — rather than shapes that grow with
|
||||
/// their contents, which is what makes stating them here honest. Two tests hold the two controls to
|
||||
/// those numbers, so the budget below cannot drift away from what the window actually leaves.
|
||||
/// </remarks>
|
||||
internal const double AccountBarHeight = 48;
|
||||
internal const double TitleBarHeight = 38;
|
||||
|
||||
/// <summary>The height the column actually gets at the window's minimum.</summary>
|
||||
internal static double VaultColumnHeight => MinimumHeight - AccountBarHeight;
|
||||
/// <inheritdoc cref="TitleBarHeight" />
|
||||
internal const double StatusBarHeight = 24;
|
||||
|
||||
/// <summary>The height a screen actually gets at the window's minimum.</summary>
|
||||
internal static double ScreenHeight => MinimumHeight - TitleBarHeight - StatusBarHeight;
|
||||
|
||||
/// <summary>The width a full-width screen gets, once the nav rail has taken its column.</summary>
|
||||
internal static double ScreenWidth => MinimumWidth - NavRailWidth;
|
||||
|
||||
private static readonly HeadlessUnitTestSession Session =
|
||||
HeadlessUnitTestSession.GetOrStartForAssembly(typeof(LayoutHarness).Assembly);
|
||||
|
||||
Reference in New Issue
Block a user