From 665af072777df0258eb5ab879d9aee83db5f3221 Mon Sep 17 00:00:00 2001 From: Mikael Tollefsen Date: Mon, 19 Oct 2026 13:30:13 +0200 Subject: [PATCH] Zoom hinting test: the wheel's own frame is checked too The frame the Ctrl+wheel event arrives in already changes the scale; the test now checks it is unhinted, not only the eased frames after it. --- crates/ui-egui/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 309d3eb3ea..4ea017faea 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -3869,6 +3869,9 @@ mod tests { }; let before = a.canvas.scale; frame(&mut a, vec![wheel]); + // The wheel's own frame already starts the zoom, unhinted. + assert_ne!(a.canvas.scale, before, "the zoom starts in the wheel's frame"); + assert!(!platform || !a.canvas.pages_hinted, "the wheel's frame is unhinted"); let (mut eased, mut unhinted) = (0, 0); let mut last = a.canvas.scale; for _ in 0..60 {