From 809604fb0bf1cbe0c29d206bd50c92ec0270918e Mon Sep 17 00:00:00 2001 From: aiongg Date: Sun, 22 Nov 2026 21:08:06 +0000 Subject: [PATCH] Type tool trials: the options bar harness waits for the font list's samples --- crates/ui-egui/src/tools/type_tool/canvas_tests.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/tools/type_tool/canvas_tests.rs b/crates/ui-egui/src/tools/type_tool/canvas_tests.rs index 0b7d4d6438..e0ad6ae1ed 100644 --- a/crates/ui-egui/src/tools/type_tool/canvas_tests.rs +++ b/crates/ui-egui/src/tools/type_tool/canvas_tests.rs @@ -217,10 +217,14 @@ fn panel_harness_without_frame_logic(app: Box) -> Harness<'static h } +/// Frames the options bar may take to settle: opening the font list loads the rows' samples over several +/// passes, more of them where the system has more fonts. +const BAR_SETTLE_STEPS: u64 = 64; + fn bar_harness(app: Box) -> Harness<'static, Box> { let _ = photocraft_text::shared(); // As tall as a window, so the bar's popup lists open in full below it. - let mut h = Harness::builder().with_context(app.ctx().clone()).with_size(vec2(1100.0, 600.0)).with_max_steps(16).build_app( + let mut h = Harness::builder().with_context(app.ctx().clone()).with_size(vec2(1100.0, 600.0)).with_max_steps(BAR_SETTLE_STEPS).build_app( |ui, app: &mut PhotocraftApp| { ui.horizontal(|ui| show_bar(app, ui)); },