From 76d055a7ee1229134bf2b69e72a3743eb7e39a69 Mon Sep 17 00:00:00 2001 From: rmsff <17902130+rmsff@users.noreply.github.com> Date: Tue, 10 Nov 2026 16:40:58 +0300 Subject: [PATCH] Start Type Mask text with the placeholder, as the Type tool does (#12072) A click or a drag with the Horizontal Type Mask tool now starts with the same selected placeholder text as the Type tool, so typing replaces it and committing it untouched selects its outline. With "Fill new type layers with placeholder text" off, masks start empty, as type does. The Vertical Type Mask keeps starting empty: its placeholder is not measured yet. --- crates/ui-egui/src/tools/type_tool/pointer.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/tools/type_tool/pointer.rs b/crates/ui-egui/src/tools/type_tool/pointer.rs index 53b924a2a2..7efdefcd09 100644 --- a/crates/ui-egui/src/tools/type_tool/pointer.rs +++ b/crates/ui-egui/src/tools/type_tool/pointer.rs @@ -317,9 +317,11 @@ pub fn pointer_up(app: &mut PhotocraftApp, start: [f64; 2], end: [f64; 2]) { // A click (not a drag) with the Type tool on a path: area type inside a closed path, type // on the path on its outline. The Type Mask tools ignore paths. let target = if !mask && !makes_box(app, start, end) { path_target(app, start[0], start[1]) } else { None }; - // Preferences ▸ Type: "Fill new type layers with placeholder text" (on by default). The Type - // Mask tools start empty, as Photoshop's do. - let text = if !mask && app.session.prefs().type_.fill_new_type_layers_with_placeholder { PLACEHOLDER } else { "" }; + // Preferences ▸ Type: "Fill new type layers with placeholder text" (on by default). The + // Horizontal Type Mask gets the Type tool's placeholder, as Photoshop's does (#12072); the + // vertical mask's placeholder is not measured yet, so it keeps starting empty. + let placeholder = app.ui.tool != crate::state::Tool::VerticalTypeMask && app.session.prefs().type_.fill_new_type_layers_with_placeholder; + let text = if placeholder { PLACEHOLDER } else { "" }; let mut p = default_style_params(app); p["text"] = json!(text); p["orientation"] = json!(if app.ui.tool.is_vertical_type() { "vertical" } else { "horizontal" });