feat(audio dock): the shell — 168px, auto-collapsing, replacing the empty bottom bar
Unit 4 of the sound-bar refactor. `Controls/AudioDock` takes the bottom row that held the empty `BottomBar` spacer (deleted): four bay containers (MIC / GAME / TRAX / LIP-SYNC) above a 36px master strip, all token-styled. Height comes from `Models/AudioDockLayout`, not from a setting: 168px normally, 36px below a 900px window height. At the 1366×768 minimum a full dock leaves ~398px for the preview, so the collapse is mandatory, not cosmetic. The dock listens to its window's SizeChanged and re-applies. Nothing here pretends to be a meter yet — the bays and the master readouts fill in over the next units, each with its own test. Guard: AudioDockLayoutTests pins both sides of the threshold (768 collapsed, 1040 expanded), the boundary itself, and the two heights as the design's numbers.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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 168px 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;
|
||||
|
||||
public const double ExpandedHeight = 168;
|
||||
public const double CollapsedHeight = 36;
|
||||
|
||||
public static bool IsCollapsed(double windowHeight) => windowHeight < CollapseBelowHeight;
|
||||
|
||||
public static double HeightFor(double windowHeight)
|
||||
=> IsCollapsed(windowHeight) ? CollapsedHeight : ExpandedHeight;
|
||||
}
|
||||
Reference in New Issue
Block a user