Pipette cursor test: Windows reports the precise crosshair with its bitmap (Windows CI red since #1160) (#1626)

* Pipette cursor test: Windows reports the precise crosshair with its bitmap (#1160)

test (windows-latest) fails on main in input_tests::eyedropper_and_alt_sampling_show_a_pipette
("Precise keeps the crosshair": left Crosshair, right None). #1437 expected None on Windows because
the canvas drew the crosshair and hid the OS cursor; since #1160 Windows hands the OS a bitmap
cursor and tool_cursor's end-of-pass hook reports Crosshair underneath it. The test now expects
Crosshair everywhere, plus the bitmap on Windows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UHgFEHEsefoQoBParH47JA

* i18n(el): translate "Pick a screen pixel or press Esc to cancel"

The last screen color picker string #1618 missed: xtask's
source_key_set_is_covered_by_complete_catalogs still fails on main for el.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UHgFEHEsefoQoBParH47JA
(cherry picked from commit 14ed88e399)

---------

Co-authored-by: Claude <[email protected]>
This commit is contained in:
BFlatandClaude authored and GitHub committed 2026-10-09 13:23:57 +07:00
1 parent df0fd003d8
commit 4a406a6cf6
1 file changed
+9 -4
+9 -4
View File
@@ -488,10 +488,15 @@ 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();
// 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");
// Every platform reports the crosshair. Windows also hands the OS a black-and-white bitmap
// for it (`tool_cursor`, #1160), with `Crosshair` underneath as the fallback.
let precise = |h: &mut Harness<'static, PhotocraftApp>| {
let icon = cursor(h);
(icon, h.output().platform_output.cursor_image.is_some())
};
let windows = cfg!(target_os = "windows");
assert_eq!(precise(&mut h), (egui::CursorIcon::Crosshair, windows), "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), crosshair);
assert_eq!(precise(&mut h), (egui::CursorIcon::Crosshair, windows));
}