M3.66: Scale Strokes & Effects is off by default

New preferences start with Scale Strokes & Effects off, as in Illustrator:
scaling an object keeps its stroke weights, dashes and effect distances unless
the option (or `strokes: true`) is on. Preference files that already store the
option keep their value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
bflatasticandClaude Opus 5.5 committed 2026-10-05 06:17:36 +07:00
1 parent 5750786e63
commit a0b694dcd8
3 files changed
+7 -4

No files matched your search

+1 -1
View File
@@ -367,7 +367,7 @@ impl Default for Prefs {
double_click_to_isolate: true,
transform_pattern_tiles: false,
scale_corners: false,
scale_strokes: true,
scale_strokes: false,
zoom_with_mouse_wheel: false,
paste_offset: 10.0,
selection_tolerance: 3.0,
+4 -1
View File
@@ -91,7 +91,10 @@ fn rotate_and_scale() {
s.execute("object.scale", &json!({"sx": 200})).unwrap();
let b = s.doc().unwrap().doc.node(a).unwrap().geometric_bounds().unwrap();
assert!((b.width() - 20.0).abs() < 1e-9);
// stroke scaled with the object
// Scale Strokes & Effects is off by default: the stroke keeps its weight
assert_eq!(s.doc().unwrap().doc.node(a).unwrap().appearance.stroke_width(), 1.0);
// and scales with the object when asked
s.execute("object.scale", &json!({"sx": 200, "strokes": true})).unwrap();
assert_eq!(s.doc().unwrap().doc.node(a).unwrap().appearance.stroke_width(), 2.0);
}
+2 -2
View File
@@ -672,8 +672,8 @@ the preference `japaneseCropMarks` is on or `style: "japanese"` is given.
## Scale Strokes & Effects
`object.scale`, `object.transform` and `object.transformEach` take `strokes?: bool` (Scale Strokes & Effects) and
`corners?: bool` (Scale Corners); without them the preferences `scaleStrokes` (default on) and `scaleCorners` (default
off) apply (`prefs.set {key, value}`). With strokes on, a scale by k (the square root of the transform's determinant)
`corners?: bool` (Scale Corners); without them the preferences `scaleStrokes` and `scaleCorners` (both off by
default) apply (`prefs.set {key, value}`). With strokes on, a scale by k (the square root of the transform's determinant)
multiplies stroke weights, dash lengths and dash offsets, and every distance parameter of the object's, its fills' and
its strokes' effects (drop shadow offsets and blur, offsets, radii…; `effect.list` gives each effect's `lengths`;
relative Roughen, Tweak and Zig Zag sizes stay percentages), in groups and layers too. With it off, nothing painted