Fix #40: W/H constrain-proportions link in the Properties panel and Control bar

The Transform panel had the link, but kept it in panel-local egui memory;
the Properties panel's Transform section and the Control bar had none, so
size changes there were never proportional.

The link is now the constrainProportions preference (prefs.get/prefs.set),
one toggle shared by the three places (transform::constrain_link), and every
W/H field passes it to object.setBounds as `proportional`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bflatastic
2026-10-06 00:08:34 +07:00
co-authored by Claude Opus 5.5
parent 6780ffae60
commit 6992c843b4
8 changed files with 117 additions and 8 deletions
+11
View File
@@ -1667,3 +1667,14 @@ its undo history are as if the click never happened. Commands on the edited text
```json
{"name":"run_command","arguments":{"command":"text.discardEmpty","params":{"id":42}}}
```
## Constrain proportions
The link between W and H in the Transform panel, the Properties panel and the Control bar is the
`constrainProportions` preference (`prefs.get` / `prefs.set`). With it on, those fields send `proportional: true`
to `object.setBounds`, which scales the other dimension by the same factor; agents pass `proportional` themselves.
```json
{"name":"run_command","arguments":{"command":"prefs.set","params":{"key":"constrainProportions","value":true}}}
{"name":"run_command","arguments":{"command":"object.setBounds","params":{"width":200,"proportional":true}}}
```