diff --git a/crates/midra-layout/src/format_ui.rs b/crates/midra-layout/src/format_ui.rs index 273fce3..33e793e 100644 --- a/crates/midra-layout/src/format_ui.rs +++ b/crates/midra-layout/src/format_ui.rs @@ -38,7 +38,14 @@ impl OutputDraft { pub(super) fn new(output: [u32; 2]) -> Self { Self { size: output.map(f64::from), - aspect: Aspect::Custom, + aspect: Aspect::ALL + .into_iter() + .find(|aspect| { + aspect.ratio().is_some_and(|ratio| { + (output[0] as f64 / output[1] as f64 - ratio).abs() < 1e-9 + }) + }) + .unwrap_or(Aspect::Custom), locked: false, error: String::new(), } diff --git a/docs/midra-layout.md b/docs/midra-layout.md index c7bd2e2..003879f 100644 --- a/docs/midra-layout.md +++ b/docs/midra-layout.md @@ -157,7 +157,9 @@ identifies every destination explicitly and applies the mapped selection togethe ## Current limits The document currently has two local rectangles and two source identities. -Output resolution defaults to **1920 × 1080** and can be changed. +Output resolution defaults to **1920 × 1080 (16:9)** and can be changed. +The output dialog identifies standard aspect ratios from the current resolution; +nonstandard ratios display as Custom. The initial backdrop is illustrative; importing a reference picture replaces it. Live video, verified hardware container/crop conversion and persistent session files are future work. Sessions currently live only in memory.