From a9eae3a3337f8984db4bb1e942231f5328a067e0 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 4 Nov 2026 08:23:47 -0800 Subject: [PATCH] Appearance: Add New Fill and Add New Stroke comment names the paint they take The comment in add_item said a new fill or stroke is a copy of the top one. The code takes only the top item's paint, and for a stroke its weight. The comment now says so, as the params text does. --- crates/engine/src/cmd/appearance.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/appearance.rs b/crates/engine/src/cmd/appearance.rs index 4fb14ec31..8fb5734ef 100644 --- a/crates/engine/src/cmd/appearance.rs +++ b/crates/engine/src/cmd/appearance.rs @@ -559,8 +559,9 @@ fn add_item(s: &mut Session, p: &Value, fill: bool) -> Result { } continue; } - // A copy of the top fill (stroke); without one, type's characters' and otherwise the - // default paint, so a new fill on a group or type shows. + // The top fill's (stroke's) paint; without one, type's characters' and otherwise the + // default paint, so a new fill on a group or type shows. A new stroke takes the top + // stroke's weight when that stroke has paint, at least 1 pt. let paint = match (n.appearance.paint_at(None, fill), &n.kind) { (Some(p), _) => p.clone(), (None, NodeKind::Text(_)) => super::paint::proxy_paint(n, !fill, None),