This commit is contained in:
David Mann committed 2026-11-14 17:18:21 +01:00
commit c131664ea7
4 files changed
+8

No files matched your search

@@ -22,6 +22,8 @@ fn app() -> PhotocraftApp {
/// `draw` in a row, once the app's fonts are set up (the first pass has none).
fn harness(draw: fn(&mut PhotocraftApp, &mut egui::Ui)) -> Harness<'static, PhotocraftApp> {
// Load the fonts first: if they finish mid-test the bar swaps "Loading fonts…" for its menus and a click is lost (#13408).
let _ = photocraft_text::shared();
let mut h = Harness::builder().with_size(vec2(1400.0, 600.0)).build_ui_state(
move |ui, app| {
if ui.ctx().fonts(|f| f.families().contains(&egui::FontFamily::Name("medium".into()))) {
@@ -47,6 +47,8 @@ fn editing(mut app: PhotocraftApp, id: LayerId) -> PhotocraftApp {
/// The options bar in a row, once the app's fonts are set up (the first pass has none).
fn harness(app: PhotocraftApp) -> Harness<'static, PhotocraftApp> {
// Load the fonts first: if they finish mid-test the bar swaps "Loading fonts…" for its menus and a click is lost (#13408).
let _ = photocraft_text::shared();
let mut h = Harness::builder().with_size(vec2(1400.0, 200.0)).with_max_steps(16).build_ui_state(
|ui, app| {
if ui.ctx().fonts(|f| f.families().contains(&egui::FontFamily::Name("medium".into()))) {
@@ -39,6 +39,8 @@ fn app_with_layer(size: f32) -> (PhotocraftApp, LayerId) {
/// `draw` in a window tall enough for the list, once the app's fonts are set up. Up to 16 passes,
/// because the font list arrives in batches (see `canvas_tests::controls`).
fn harness(app: PhotocraftApp, draw: fn(&mut PhotocraftApp, &mut egui::Ui)) -> Harness<'static, PhotocraftApp> {
// Load the fonts first: if they finish mid-test the bar swaps "Loading fonts…" for its menus and a click is lost (#13408).
let _ = photocraft_text::shared();
let mut h = Harness::builder().with_size(vec2(1400.0, 800.0)).with_max_steps(16).build_ui_state(
move |ui, app| {
if ui.ctx().fonts(|f| f.families().contains(&egui::FontFamily::Name("medium".into()))) {
@@ -31,6 +31,8 @@ fn text_layer(app: &mut PhotocraftApp, orientation: &str) -> LayerId {
}
pub(super) fn bar(app: PhotocraftApp) -> Harness<'static, PhotocraftApp> {
// Load the fonts first: if they finish mid-test the bar swaps "Loading fonts…" for its menus and a click is lost (#13408).
let _ = photocraft_text::shared();
let mut h = Harness::builder().with_size(egui::vec2(1200.0, 60.0)).build_ui_state(
|ui, app: &mut PhotocraftApp| {
ui.horizontal(|ui| super::options_bar(app, ui));