mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-14 19:26:51 -04:00
Pipette cursor test: Windows draws the precise crosshair itself
input_tests::eyedropper_and_alt_sampling_show_a_pipette (#1028) expected the OS crosshair with Other Cursors = Precise, but on Windows the canvas draws its own crosshair and hides the OS cursor (visible_crosshair), so the test failed on every Windows run. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UHgFEHEsefoQoBParH47JA
This commit is contained in:
1 file changed
+4
-2
@@ -384,8 +384,10 @@ fn eyedropper_and_alt_sampling_show_a_pipette() {
|
||||
h.event(egui::Event::ModifiersChanged(Modifiers::ALT));
|
||||
assert_eq!(cursor(&mut h), egui::CursorIcon::None, "⌥ samples with a pipette");
|
||||
h.state_mut().run("prefs.set", json!({"values": {"cursors.other": "precise"}})).unwrap();
|
||||
assert_eq!(cursor(&mut h), egui::CursorIcon::Crosshair, "Precise keeps the crosshair");
|
||||
// Windows draws the crosshair on the canvas and hides the OS cursor (`visible_crosshair`).
|
||||
let crosshair = if cfg!(target_os = "windows") { egui::CursorIcon::None } else { egui::CursorIcon::Crosshair };
|
||||
assert_eq!(cursor(&mut h), crosshair, "Precise keeps the crosshair");
|
||||
h.event(egui::Event::ModifiersChanged(Modifiers::NONE));
|
||||
h.state_mut().ui.tool = crate::state::Tool::Eyedropper;
|
||||
assert_eq!(cursor(&mut h), egui::CursorIcon::Crosshair);
|
||||
assert_eq!(cursor(&mut h), crosshair);
|
||||
}
|
||||
Reference in new issue
Block a user