Merge PR #1043: Replace Fonts test: a window wide enough to hold Home's ribbon

This commit is contained in:
aiongg
2026-10-24 06:15:03 +00:00
+5 -1
View File
@@ -15,7 +15,11 @@ fn harness() -> Harness<'static, SlideApp> {
s.execute("format.font", &json!({"family": "Comic Neue"})).unwrap();
s.execute("format.size", &json!({"size": 40})).unwrap();
let app = SlideApp::new(s, Services::default());
let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 60.0).build_ui_state(
// Home's ribbon is wider than it was when this test was written: at 1400 the Editing group
// begins at x=1398, so the Replace Fonts button is two pixels wide on screen and a click at
// its centre lands outside the window. The ribbon does not scroll sideways, so the window has
// to be wide enough to hold it -- 1800 is what the other full-ribbon tests here use.
let mut h = Harness::builder().with_size(egui::vec2(1800.0, 1100.0)).with_step_dt(1.0 / 60.0).build_ui_state(
|ui, app: &mut SlideApp| {
app.logic(ui.ctx());
app.ui(ui);