From 983a656851544ba38069571a93971a6db7d64b88 Mon Sep 17 00:00:00 2001 From: kubuntugamer <52578831+kubuntugamer@users.noreply.github.com> Date: Sun, 22 Nov 2026 20:37:11 -0600 Subject: [PATCH 1/2] Vertical Type tool: a T with a downward arrow, its own glyph (#12062) Both Type tools showed the same plain T in the rail, its flyout and the options bar's tool preset picker. The vertical one now draws a T with a downward arrow at its left, on Lucide's 24 px grid and stroke, from the app's own icon set. The horizontal Type tool, both Type Mask tools and every other glyph keep what they had. --- ATTRIBUTION.md | 1 + assets/icons/type-vertical.svg | 17 +++++++++++++++++ crates/ui-egui/src/icon_data.rs | 1 + crates/ui-egui/src/icons.rs | 8 ++++++++ crates/ui-egui/src/panels/tool_commands.rs | 2 +- 5 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 assets/icons/type-vertical.svg diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index fea885a3a0..adf1c3ff25 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -18,6 +18,7 @@ next to them. | `assets/icons/{link-2,type,x}.svg` | Lucide icons derived from Feather (subset of the row above) | Cole Bemis (Feather), Lucide Contributors | via Lucide | MIT (Feather) and ISC (Lucide), [`assets/icons/LICENSE-lucide.txt`](assets/icons/LICENSE-lucide.txt) | | `assets/icons/vector-shape.svg` | Vector path shape-layer glyph with four anchor points | @superplay2021 | Original work for PhotoCraft | MIT OR Apache-2.0 | | `assets/icons/spirit-level.svg` | Straighten tool glyph: a spirit level with its vial and bubble under a dotted arc | PhotoCraft contributors | Original work | MIT OR Apache-2.0 | +| `assets/icons/type-vertical.svg` | Vertical Type tool glyph: Lucide `type`'s T, drawn narrower to make room for a downward arrow of our own at its left | Lucide Icons and Contributors; arrow by PhotoCraft contributors | Derived from `icons/type.svg` | ISC, [`assets/icons/LICENSE-lucide.txt`](assets/icons/LICENSE-lucide.txt) | | `assets/icons/path-op-{new-layer,combine,subtract,intersect,exclude,merge}.svg` | Path Operations glyphs (Pen options bar): a single square for New Layer, and two overlapping squares showing the area each operation keeps (union, back minus front, overlap, everything but the overlap, the merged outline), drawn on Lucide's 24 px grid and stroke | PhotoCraft contributors | Original work | MIT OR Apache-2.0 | | `assets/icons/history-brush.svg` | History Brush tool glyph: Lucide `brush` plus counter-clockwise history rewind arrow | Lucide Icons and Contributors; arrow by PhotoCraft contributors | Derived from `icons/brush.svg` | ISC, [`assets/icons/LICENSE-lucide.txt`](assets/icons/LICENSE-lucide.txt) | | `assets/dict/en_US-scowl-50.txt.gz` | English word list for Check Spelling (SCOWL 2020.12.07, size 50, en_US; 72,403 words) | Kevin Atkinson and the SCOWL contributors | | SCOWL license (permissive, keep the notice), [`assets/dict/LICENSE-SCOWL.txt`](assets/dict/LICENSE-SCOWL.txt), which also has the build recipe | diff --git a/assets/icons/type-vertical.svg b/assets/icons/type-vertical.svg new file mode 100644 index 0000000000..d9f05ab416 --- /dev/null +++ b/assets/icons/type-vertical.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/crates/ui-egui/src/icon_data.rs b/crates/ui-egui/src/icon_data.rs index a4e5efa29b..797bede39f 100644 --- a/crates/ui-egui/src/icon_data.rs +++ b/crates/ui-egui/src/icon_data.rs @@ -34,6 +34,7 @@ pub static ICONS: &[(&str, &[u8])] = &[ ("square-dashed-mouse-pointer", include_bytes!("../../../assets/icons/square-dashed-mouse-pointer.svg")), ("triangle-alert", include_bytes!("../../../assets/icons/triangle-alert.svg")), ("type", include_bytes!("../../../assets/icons/type.svg")), + ("type-vertical", include_bytes!("../../../assets/icons/type-vertical.svg")), ("vector-shape", include_bytes!("../../../assets/icons/vector-shape.svg")), ("x", include_bytes!("../../../assets/icons/x.svg")), ]; diff --git a/crates/ui-egui/src/icons.rs b/crates/ui-egui/src/icons.rs index c2b4ce25cd..863cee404d 100644 --- a/crates/ui-egui/src/icons.rs +++ b/crates/ui-egui/src/icons.rs @@ -66,6 +66,14 @@ mod tests { } } + /// The two Type tools are different tools, so they show different glyphs: the vertical one draws + /// the T with a downward arrow, not the horizontal one's plain T (#12062). + #[test] + fn the_type_tools_show_different_glyphs() { + assert_ne!(tool_icon(Tool::VerticalType), tool_icon(Tool::Type)); + assert_eq!(tool_icon(Tool::Type).name(), "type", "the horizontal Type tool keeps its glyph"); + } + /// Every panel's iconic form draws the registry's icon, so each registry name resolves. #[test] fn every_panel_icon_resolves() { diff --git a/crates/ui-egui/src/panels/tool_commands.rs b/crates/ui-egui/src/panels/tool_commands.rs index 47e4a7085a..d70707bee8 100644 --- a/crates/ui-egui/src/panels/tool_commands.rs +++ b/crates/ui-egui/src/panels/tool_commands.rs @@ -69,7 +69,7 @@ pub(crate) enum ToolCommand { PaintBucket, #[command(label = "Horizontal Type Tool", icon = "type", kind = "tool", group = "T", default = "T", alias = "tools.select.type")] Type, - #[command(label = "Vertical Type Tool", icon = "type", kind = "tool", group = "T", default = "T", alias = "tools.select.verticalType")] + #[command(label = "Vertical Type Tool", icon = "type-vertical", kind = "tool", group = "T", default = "T", alias = "tools.select.verticalType")] VerticalType, #[command(label = "Horizontal Type Mask Tool", icon = "type_mask", kind = "tool", group = "T", default = "T", alias = "tools.select.horizontalTypeMask")] HorizontalTypeMask, From 73d619ad3bf5871581d3fd94dff7c9eb4df95380 Mon Sep 17 00:00:00 2001 From: kubuntugamer <52578831+kubuntugamer@users.noreply.github.com> Date: Sun, 22 Nov 2026 21:09:31 -0600 Subject: [PATCH 2/2] Vertical Type tool: the glyph tests live in their own file (#12062) The issue asks for tests in crates/ui-egui/src/vertical_type_icon_tests.rs; the registration test also names the app icon set the glyph comes from. --- crates/ui-egui/src/icons.rs | 8 ------ crates/ui-egui/src/lib.rs | 2 ++ .../ui-egui/src/vertical_type_icon_tests.rs | 27 +++++++++++++++++++ 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 crates/ui-egui/src/vertical_type_icon_tests.rs diff --git a/crates/ui-egui/src/icons.rs b/crates/ui-egui/src/icons.rs index 863cee404d..c2b4ce25cd 100644 --- a/crates/ui-egui/src/icons.rs +++ b/crates/ui-egui/src/icons.rs @@ -66,14 +66,6 @@ mod tests { } } - /// The two Type tools are different tools, so they show different glyphs: the vertical one draws - /// the T with a downward arrow, not the horizontal one's plain T (#12062). - #[test] - fn the_type_tools_show_different_glyphs() { - assert_ne!(tool_icon(Tool::VerticalType), tool_icon(Tool::Type)); - assert_eq!(tool_icon(Tool::Type).name(), "type", "the horizontal Type tool keeps its glyph"); - } - /// Every panel's iconic form draws the registry's icon, so each registry name resolves. #[test] fn every_panel_icon_resolves() { diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index 4094a2c242..6fa1191a7f 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -1076,6 +1076,8 @@ mod preferences_submenu_tests; #[cfg(test)] mod selection_move_step_tests; #[cfg(test)] +mod vertical_type_icon_tests; +#[cfg(test)] mod view_guides_submenu_tests; #[cfg(test)] diff --git a/crates/ui-egui/src/vertical_type_icon_tests.rs b/crates/ui-egui/src/vertical_type_icon_tests.rs new file mode 100644 index 0000000000..b92a85a68f --- /dev/null +++ b/crates/ui-egui/src/vertical_type_icon_tests.rs @@ -0,0 +1,27 @@ +//! #12062: the Vertical Type tool has its own glyph (a T with a downward arrow), so the rail, the +//! T group's flyout and the options bar's tool preset picker tell it from the horizontal Type tool. + +use craft::ui::primitives::has_icon; + +use crate::icon_data::ICONS; +use crate::icons::{register, tool_icon}; +use crate::state::Tool; + +/// The two Type tools are different tools, so they show different glyphs: the vertical one draws the +/// T with a downward arrow, not the horizontal one's plain T. +#[test] +fn the_type_tools_show_different_glyphs() { + register(); + assert_eq!(tool_icon(Tool::Type).name(), "type", "the horizontal Type tool keeps its glyph"); + assert_eq!(tool_icon(Tool::VerticalType).name(), "type-vertical"); + assert_ne!(tool_icon(Tool::VerticalType), tool_icon(Tool::Type)); +} + +/// The vertical glyph is PhotoCraft's own asset, not a catalog name, so the app set has to carry it: +/// an unregistered name paints nothing and only logs. +#[test] +fn the_vertical_glyph_is_an_app_icon() { + register(); + assert!(has_icon(&tool_icon(Tool::VerticalType)), "the vertical glyph resolves"); + assert!(ICONS.iter().any(|&(name, _)| name == "type-vertical"), "it comes from the app's icon set"); +}