diff --git a/crates/ui-egui/src/tools/vector_ui/add_anchor_options_bar_tests.rs b/crates/ui-egui/src/tools/vector_ui/add_anchor_options_bar_tests.rs index 76e324153a..44d1720f70 100644 --- a/crates/ui-egui/src/tools/vector_ui/add_anchor_options_bar_tests.rs +++ b/crates/ui-egui/src/tools/vector_ui/add_anchor_options_bar_tests.rs @@ -1,6 +1,5 @@ //! #12731: the Add Anchor Point options bar holds the preset picker and "No options for the Add -//! Anchor Point Tool." centred in the rest of the bar, as in Photoshop; the Delete Anchor Point bar -//! keeps its hint. +//! Anchor Point Tool." centred in the rest of the bar, as in Photoshop. use egui::vec2; use egui_kittest::Harness; @@ -39,11 +38,3 @@ fn add_anchor_point_bar_says_it_has_no_options() { let mid = (rect.min.x + rect.max.x) / 2.0; assert!((mid - centre).abs() < 20.0, "text centre {mid} vs remaining bar centre {centre}"); } - -#[test] -fn delete_anchor_point_bar_keeps_its_hint() { - let h = harness(Tool::DeleteAnchorPoint); - let hint = crate::i18n::fmt("Click an anchor point to delete it · {alt}-click a segment to add one", &[("alt", &crate::shortcuts::pretty("Alt"))]); - h.get_by_label(&hint); - assert!(h.query_by_label(NO_OPTIONS).is_none()); -} diff --git a/crates/ui-egui/src/tools/vector_ui/options.rs b/crates/ui-egui/src/tools/vector_ui/options.rs index 00c652c690..6b4dec79de 100644 --- a/crates/ui-egui/src/tools/vector_ui/options.rs +++ b/crates/ui-egui/src/tools/vector_ui/options.rs @@ -51,8 +51,9 @@ pub fn options_bar(app: &mut PhotocraftApp, ui: &mut egui::Ui, tool: Tool) -> bo return true; } if tool == Tool::DeleteAnchorPoint { - let hint = tl!("Click an anchor point to delete it · {alt}-click a segment to add one"); - lbl(ui, &crate::i18n::fmt(hint, &[("alt", &crate::shortcuts::pretty("Alt"))])); + // Photoshop centres this in the rest of the bar after the preset picker (#12827). + let text = egui::RichText::new(tl!("No options for the Delete Anchor Point Tool.")).color(t.text_dim).size(12.0); + ui.add_sized([ui.available_width(), ui.available_height()], egui::Label::new(text)); return true; } if matches!(tool, Tool::Pen | Tool::FreeformPen | Tool::CurvaturePen) {