From 2443d1250b4b3ae62555da0411bbc97cc441b74c Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Tue, 10 Nov 2026 23:27:25 -0800 Subject: [PATCH] Character Styles: a tint error names the Fill Tint or Stroke Tint field An out-of-range or non-numeric tint in Character Style Options and New Character Style gave "Tint must be a number from 0 to 100" for both fields, so the message did not say which of the two to correct. It now names "Fill Tint" or "Stroke Tint", the names the two fields carry. --- crates/ui-egui/src/dialogs/char_style_options.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/dialogs/char_style_options.rs b/crates/ui-egui/src/dialogs/char_style_options.rs index 2011d2616a..d1ca76cc58 100644 --- a/crates/ui-egui/src/dialogs/char_style_options.rs +++ b/crates/ui-egui/src/dialogs/char_style_options.rs @@ -251,7 +251,8 @@ fn optional_number(d: &Dialog, key: &str) -> Result, String> { "v_scale" => tl!("Vertical Scale"), "baseline_shift" => tl!("Baseline Shift"), "rotation" => tl!("Character Rotation"), - "fill_tint" | "stroke_tint" => tl!("Tint"), + "fill_tint" => tl!("Fill Tint"), + "stroke_tint" => tl!("Stroke Tint"), "stroke_width" => tl!("Weight"), _ => return Err("unknown character style number field".into()), }; @@ -1649,8 +1650,8 @@ mod tests { fn color_tint_and_weight_outside_their_limits_are_errors() { let linked = json!({"type": "solid", "color": {"model": "gray", "k": 0.5}, "swatch": "Ink"}); for (key, value, message) in [ - ("fill_tint", "150", "Tint must be a number from 0 to 100"), - ("stroke_tint", "-1", "Tint must be a number from 0 to 100"), + ("fill_tint", "150", "Fill Tint must be a number from 0 to 100"), + ("stroke_tint", "-1", "Stroke Tint must be a number from 0 to 100"), ("stroke_width", "-1", "Weight must be a number from 0 to 4000000"), ("stroke_width", "thick", "Weight must be a number"), ] {