From d2e028c3d49870a5905d7535070bbdf26fe76f38 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Mon, 5 Oct 2026 01:36:11 -0400 Subject: [PATCH] Crop test: the frame starts at the press origin now (#123) Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/crop_ui.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/crop_ui.rs b/crates/ui-egui/src/crop_ui.rs index 63bc83f666f..9d5b5b38081 100644 --- a/crates/ui-egui/src/crop_ui.rs +++ b/crates/ui-egui/src/crop_ui.rs @@ -400,8 +400,9 @@ mod tests { h.step(); } let drawn = h.state().ui.crop_rect.unwrap(); - // egui starts the drag at the first move past its threshold (220, 170). - assert_eq!((drawn[2] - drawn[0], drawn[3] - drawn[1]), (20.0, 10.0), "40x20 screen px at 200%"); + // The frame starts where the button went down (200, 150), not at the first move past + // egui's drag threshold (#123). + assert_eq!((drawn[2] - drawn[0], drawn[3] - drawn[1]), (30.0, 20.0), "60x40 screen px at 200%"); h.event(space(true)); h.step(); for p in [pos2(280.0, 200.0), pos2(300.0, 210.0)] {