From 3d42ae6d302042bbad398b797f5fb164998c354b Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 14 Nov 2026 22:25:40 -0800 Subject: [PATCH] Recolor Artwork: new comments use American spelling The comments added with the Add Color and Remove Color tools spell color the American way, and the test comment for the second Add Color click describes the click the test makes. --- crates/engine/src/cmd/swatch.rs | 4 ++-- crates/ui-egui/src/dialogs/recolor.rs | 6 +++--- crates/ui-egui/src/tests/recolor.rs | 2 +- crates/ui-egui/src/widgets/color.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/engine/src/cmd/swatch.rs b/crates/engine/src/cmd/swatch.rs index 595778090d..68239f67d0 100644 --- a/crates/engine/src/cmd/swatch.rs +++ b/crates/engine/src/cmd/swatch.rs @@ -1226,7 +1226,7 @@ impl GroupEdit { } /// Rewrite colour group `group` with `colors`: its swatches take them in order (keeping their -/// names, kinds and global or spot flags), a `None` removes the swatch at its place, extra colours +/// names, kinds and global or spot flags), a `None` removes the swatch at its place, extra colors /// are added as new swatches and swatches past the end are removed. Paints linked to its global /// swatches follow (a removed swatch's are unlinked); `rename` renames the group. A built-in swatch /// (None, Registration) it would change or remove is refused. @@ -1249,7 +1249,7 @@ pub(super) fn rewrite_group(d: &mut Document, group: &str, colors: &[Option = vec![]; for (i, w) in old.into_iter().enumerate() { match colors.get(i).copied().flatten() { diff --git a/crates/ui-egui/src/dialogs/recolor.rs b/crates/ui-egui/src/dialogs/recolor.rs index da34f2fbcd..de74db7d95 100644 --- a/crates/ui-egui/src/dialogs/recolor.rs +++ b/crates/ui-egui/src/dialogs/recolor.rs @@ -575,9 +575,9 @@ fn selection(d: &Dialog) -> Vec { } /// `recolor.apply` parameters: the rows, method, library and the group with its new name and -/// colours: the new colours of the rows with current colours, each in its swatch's place (`null` -/// for a row whose new colour was removed, which removes its swatch), then (with art) the group's -/// colours no row took, then the colours added on the Edit tab. +/// colors: the new colors of the rows with current colors, each in its swatch's place (`null` +/// for a row whose new color was removed, which removes its swatch), then (with art) the group's +/// colors no row took, then the colors added on the Edit tab. fn apply_params(d: &Dialog) -> Value { let rs = rows(d); let group = d.fields.get("group").and_then(Value::as_str).map(|g| { diff --git a/crates/ui-egui/src/tests/recolor.rs b/crates/ui-egui/src/tests/recolor.rs index 6ade23e504..d8002613a2 100644 --- a/crates/ui-egui/src/tests/recolor.rs +++ b/crates/ui-egui/src/tests/recolor.rs @@ -1207,7 +1207,7 @@ fn the_add_color_tool_adds_a_row_with_no_current_colors() { assert!((hue - 120.0).abs() < 1.0 && (s - 0.5).abs() < 0.01 && (b - v).abs() < 0.01, "{:?}", [hue, s, b]); assert_eq!(field(h.state(), "__sel"), json!([2]), "the new color is selected"); assert_eq!(fills(h.state()), fills_before, "a color with no current colors recolors no art"); - // A click on the new marker adds another color; the tool stays on. + // A second click adds another color; the tool stays on. let next = wheel_at(&h, 240.0, 0.75); h.input_mut().events.extend(press(next, 1)); h.run_steps(3); diff --git a/crates/ui-egui/src/widgets/color.rs b/crates/ui-egui/src/widgets/color.rs index 3a66f000d8..04aae5be55 100644 --- a/crates/ui-egui/src/widgets/color.rs +++ b/crates/ui-egui/src/widgets/color.rs @@ -923,7 +923,7 @@ pub struct WheelResponse { /// A colour moved by dragging its marker (a new hue and saturation) or, the selected colour, /// the brightness slider (a new brightness): `[h°, s, v]`, `None` where the control kept it. pub moved: Option<(usize, [Option; 3])>, - /// A click on the wheel: the colour whose marker is within reach of it (if any), and the hue + /// A click on the wheel: the color whose marker is within reach of it (if any), and the hue /// (degrees) and saturation under the pointer (1 for a marker past the wheel's edge). pub clicked: Option<(Option, [f32; 2])>, }