From 50d1a350f3bcfe15722bc2c4505ec674369dccb0 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sat, 21 Nov 2026 14:59:39 -0500 Subject: [PATCH] Use comfortable rail width in short-window test --- crates/ui-egui/tests/it/ui.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/tests/it/ui.rs b/crates/ui-egui/tests/it/ui.rs index eda90a4cce..96443df76a 100644 --- a/crates/ui-egui/tests/it/ui.rs +++ b/crates/ui-egui/tests/it/ui.rs @@ -1844,7 +1844,9 @@ fn short_window_rail_buttons_scroll_clear_of_page_navigation() { h.get_by_label("Dock navigation rail on Left").click(); crate::support::settle(&mut h); } - let in_rail = |r: egui::Rect| if on_left { r.right() <= 48.0 } else { r.left() >= width - 48.0 }; + // The comfortable-density rail is 50 points wide. + let rail_width = 50.0; + let in_rail = |r: egui::Rect| if on_left { r.right() <= rail_width } else { r.left() >= width - rail_width }; let rail = |h: &Harness<'static, PdfCraftApp>, label: &str| { h.query_all_by_label(label).map(|n| n.rect()).find(|r| in_rail(*r)).unwrap_or_else(|| panic!("{label} in the rail")) };