Public Access
Give the application a settings area built from what really exists
This commit is contained in:
@@ -55,6 +55,33 @@ internal static class LayoutHarness
|
||||
/// <remarks>v5b: 190 became 255, the design's own number rather than this bar's old approximation.</remarks>
|
||||
internal const double NavRailWidth = 255;
|
||||
|
||||
/// <summary>Settings mode's own rail, from <c>SettingsNav.axaml</c> — wider than <see cref="NavRailWidth"/>.</summary>
|
||||
internal const double SettingsNavWidth = 340;
|
||||
|
||||
/// <summary>
|
||||
/// The width settings mode's own content column asks for, from the design's <c>width:1100px</c>.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A <c>MaxWidth</c> on the page, not a <c>Width</c> — see the same trade <c>TitleBar.axaml</c>'s own
|
||||
/// search box makes with its own <c>MaxWidth="514"</c>, and for the identical reason:
|
||||
/// <see cref="SettingsContentWidth"/> below is smaller than this at the window's minimum, and a page
|
||||
/// that insisted on the full 1100 would arrange its own rows past the edge of the rectangle settings
|
||||
/// mode actually gives them.
|
||||
/// </remarks>
|
||||
internal const double SettingsDesignContentWidth = 1100;
|
||||
|
||||
/// <summary>The width a settings page's content column actually gets at the window's minimum.</summary>
|
||||
internal static double SettingsContentWidth => MinimumWidth - SettingsNavWidth;
|
||||
|
||||
/// <summary>What settings mode leaves a page between its own titlebar and the window's bottom edge.</summary>
|
||||
/// <remarks>
|
||||
/// Settings mode has no status bar and no update banner of its own — see <c>MainWindow.axaml</c>'s own
|
||||
/// remark on why both are hidden while <c>IsSettingsMode</c> is true — so this is
|
||||
/// <see cref="MinimumHeight"/> less only <see cref="TitleBarHeight"/>, not <see cref="ContentHeight"/>'s
|
||||
/// own subtraction of <see cref="StatusBarHeight"/> too.
|
||||
/// </remarks>
|
||||
internal static double SettingsContentHeight => MinimumHeight - TitleBarHeight;
|
||||
|
||||
/// <summary>
|
||||
/// What the titlebar and the status bar take off the window before any screen gets a pixel.
|
||||
/// </summary>
|
||||
@@ -193,6 +220,18 @@ internal static class LayoutHarness
|
||||
/// <summary>The width a full-width screen gets, once the nav rail has taken its column.</summary>
|
||||
internal static double ScreenWidth => MinimumWidth - NavRailWidth;
|
||||
|
||||
/// <summary>
|
||||
/// v5c-3: what the S3 usage of <c>TransfersScreen</c> gets, now that <c>MainWindow.axaml</c> gives it the
|
||||
/// session shell's own 26px-padded, 1px-bordered LOOK with none of its machinery — no tab row, header,
|
||||
/// status bar or sidebar to take further space off it.
|
||||
/// </summary>
|
||||
internal static double BucketsScreenWidth =>
|
||||
ScreenWidth - (2 * SessionShellPadding) - (2 * SessionShellBorderThickness);
|
||||
|
||||
/// <inheritdoc cref="BucketsScreenWidth" />
|
||||
internal static double BucketsScreenHeight =>
|
||||
ScreenHeight - (2 * SessionShellPadding) - (2 * SessionShellBorderThickness);
|
||||
|
||||
private static readonly HeadlessUnitTestSession Session =
|
||||
HeadlessUnitTestSession.GetOrStartForAssembly(typeof(LayoutHarness).Assembly);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user