Isolate Pencil toolbar pressure regression from preset control

This commit is contained in:
Terra854 committed 2026-12-02 21:38:50 +08:00
1 parent 1e927e61a5
commit ced0778a22
1 file changed
+6 -1
@@ -119,7 +119,12 @@ fn pressure_for_size_narrows_a_low_pressure_pencil_stroke() {
let mut h = bar(AppTheme::pro_medium());
let app = h.state_mut();
app.run("layer.new.layer", json!({})).unwrap();
app.run("tools.setBrush", json!({"brush": {"size": 13.0, "pressureSize": true, "smoothing": {"amount": 0.0}}})).unwrap();
// Isolate the bar override: the Pencil preset also controls size by pressure after #17764.
app.run(
"tools.setBrush",
json!({"brush": {"size": 13.0, "pressureSize": true, "shapeDynamics": {"size": {"control": "off"}}, "smoothing": {"amount": 0.0}}}),
)
.unwrap();
app.run("paint.pencil", json!({"points": [[20.0, 50.0, 0.2], [30.0, 50.0, 0.2], [60.0, 50.0, 1.0]]})).unwrap();
let (low, high) = (width(app, 22, 50), width(app, 58, 50));
assert!(low < high, "pressure for size on: low-pressure {low} px, high-pressure {high} px");