From 3935fcb28cb19b5c9a5723f27ee22141f9df09d3 Mon Sep 17 00:00:00 2001 From: BFlat Date: Tue, 24 Nov 2026 09:03:43 +0700 Subject: [PATCH] Tests: the native Appearance window's Delete test presses the Fill row's empty space just right of its label, found from the label's rect, instead of a fixed offset that the row's swatch now covers (#9205) --- crates/ui-egui/src/panel_docking/native_tests.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/panel_docking/native_tests.rs b/crates/ui-egui/src/panel_docking/native_tests.rs index b21b94244e..4c33e45b1e 100644 --- a/crates/ui-egui/src/panel_docking/native_tests.rs +++ b/crates/ui-egui/src/panel_docking/native_tests.rs @@ -357,8 +357,9 @@ fn delete_after_a_row_click_in_a_native_appearance_window_removes_the_row() { h.frames(20); let fill = h.host.borrow().windows.get(&viewport).and_then(|w| w.texts.iter().find(|(t, _)| t == "Fill:").map(|(_, r)| *r)).expect("the Fill row"); - // The row's empty space right of its swatch (its name is a link that opens the Color panel). - let at = pos2(fill.left() + 110.0, fill.center().y); + // The row's empty space just right of its label, taken from the label so it holds wherever the swatch sits + // (the label is a link that opens the Color panel). + let at = fill.right_center() + vec2(fill.height(), 0.0); for (events, pressed) in [(vec![Event::PointerMoved(at)], None), (vec![], Some(true)), (vec![], Some(false))] { let mut events = events; if let Some(pressed) = pressed {