mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
Fix #400: Scrub numeric fields by dragging their label
Dragging a numeric field's label left or right steps the field's value, as Photoshop's scrubby labels do (beyond Illustrator): one unit every 2 points, ten with Shift, a tenth with Ctrl/Cmd (counts stay whole), in the field's unit and precision. The panels apply each value as they apply a typed one, so the art follows live and the caller's limits hold (dragging back from a limit changes the value at once). - scrub.rs: the label zone over the label noted just before a field (dim_label, label_row, widgets::field_label, the Character and Paragraph panels' icons, the Transform and Properties rotate/shear icons), the ↔ cursor on hover, a click on the label focuses the field. The text box itself never scrubs; a field without a label doesn't. num_field, plain_field, mixed_field (and the spin fields) and opt_field take part. - Engine: undo groups (Session::begin_undo_group / end_undo_group). The edits made in a group, commands and committed live drags alike, are one undo step, journaled one by one; a cancelled group is undone and dropped from the journal. The app opens one while a label is dragged, so a scrub is one undo step whichever path the panel applies values by (app.run, session.execute, live_run), and Escape cancels it (shortcuts leave Escape to the drag, so it doesn't close a dialog or deselect). - Preferences > General > Scrub Numeric Fields by Dragging (`scrubNumericFields`, on by default), translated in ja, es, zh-hans, zh-hant and pt-br. - Tests: label drags with Shift/Ctrl, limits, counts and units, Escape, the preference, the cursor, click-to-focus, no scrub on the box or without a label, and in the app one undo step for a W drag. - ROADMAP and docs/mcp.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
48cfb414ca
commit
b71d877a0a
27 files changed
+720
-55
No files matched your search
+3
-1
@@ -1147,7 +1147,9 @@ The Selection & Anchor Display and General preferences apply to `pointer_gesture
|
||||
The preferences for the view need the desktop app (`vectorcraft-cli mcp --connect`): `zoomWithMouseWheel` (the
|
||||
wheel zooms about the pointer, Shift-wheel scrolls up and down, Cmd/Ctrl-wheel sideways; the control channel's
|
||||
`ui.wheel` turns the wheel), `zoomToSelection` (on: Zoom In and Zoom Out centre the selection), `showToolTips`,
|
||||
`anchorSize` (1–7), `gridColor`, `gridStyle`, `gridsInBack`, `guideColor`, `guideStyle` and `recentFontsCount`.
|
||||
`anchorSize` (1–7), `gridColor`, `gridStyle`, `gridsInBack`, `guideColor`, `guideStyle`, `recentFontsCount` and
|
||||
`scrubNumericFields` (on: a horizontal drag on a numeric field's label steps the field, one undo step per drag; the
|
||||
control channel's `ui.drag` scrubs).
|
||||
|
||||
## Type preferences
|
||||
|
||||
|
||||
Reference in new issue
Block a user