- The dock now sits in the preview column (Grid.Column=1), so its left edge is the layers panel's right edge instead of starting under the brand column. It is a preview-column control, not a full-width footer. - Expanded height 168 → 148 (112 bays + 36 master strip): the mockup's number read as wasted space beneath the 154px scene strip. Guard: AudioDockLayoutTests pins 148 as the design number, so the constant cannot drift silently.
26 lines
1.2 KiB
C#
26 lines
1.2 KiB
C#
namespace ytLive.Models;
|
||
|
||
/// <summary>How tall the audio dock should be for a given window height.
|
||
///
|
||
/// <para>Creator ruling (2026-10-30): the dock is 148px on a normal window and collapses to a 36px
|
||
/// telemetry strip when the window is short, because at 1366×768 a full dock leaves ~398px for the
|
||
/// preview and the composition starts letterboxing into a postage stamp.</para>
|
||
///
|
||
/// <para>Pure, so the switch is testable without a window.</para></summary>
|
||
public static class AudioDockLayout
|
||
{
|
||
/// <summary>Below this window height the dock collapses. The app's minimum is 768; the
|
||
/// default window is 1040, so a normal launch shows the full dock.</summary>
|
||
public const double CollapseBelowHeight = 900;
|
||
|
||
/// <summary>148 = 112 of bays + the 36px master strip. The mockup wanted 168; the creator
|
||
/// read that as wasted space under a 154px scene strip, so the bays lost 20px of air.</summary>
|
||
public const double ExpandedHeight = 148;
|
||
public const double CollapsedHeight = 36;
|
||
|
||
public static bool IsCollapsed(double windowHeight) => windowHeight < CollapseBelowHeight;
|
||
|
||
public static double HeightFor(double windowHeight)
|
||
=> IsCollapsed(windowHeight) ? CollapsedHeight : ExpandedHeight;
|
||
}
|