Repository navigation
Fix #485: the mouse wheel steps the focused numeric field - #497
Merged
Merged
Conversation
The wheel did nothing over numeric fields. As in Illustrator, once a numeric field has the focus, turning the wheel over it steps its value like Up/Down: a notch a step, Shift ten, Ctrl/Cmd a tenth, applied at once with the new value selected. - widgets::step_value (was step_with_arrows) reads the arrows and the wheel through one path for num_field, plain/mixed fields and the spin fields built on them (panels, the Control bar, dialogs, the Font Size and Leading combo boxes), and now opt_field (Stroke dash/gap) too. Trackpad and fine-wheel points add up to notches; the rest carries to the next turn. - While the pointer is over the focused field the panel under it doesn't scroll; an unfocused field, or the pointer anywhere else, leaves the wheel to the panel and the canvas as before. - The dialogs' and preferences' egui drag values become the same recessed number fields (widgets::range_field: clamped to their range, rounded to their precision), so they type, step and scroll like every other numeric field. - Headless tests for the wheel (units, modifiers, points, focus and pointer), and for the panel scrolling or not; docs/control-protocol.md and ROADMAP. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bflatastic
force-pushed
the
fix/issue-485
branch
from
October 8, 2026 13:32
2d809f2 to
517b166
Compare
Member
Author
|
Full |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The wheel did nothing over numeric fields; as in Illustrator, once a numeric field has the focus, turning the wheel over it now steps its value like Up/Down.
widgets::step_value, formerlystep_with_arrowsfrom Panel number fields: Up/Down arrows step the value (Shift ×10, Ctrl ÷10) #357): arrows and wheel stepnum_field,plain_field/mixed_fieldand the spin fields built on them (panels, Control bar, dialogs, the Font Size / Leading combo boxes from Fix #458: Font Size and Leading combo boxes in the Character and Properties panels and the Control bar #459), and nowopt_field(Stroke dash/gap) too. A notch is one step, Shift ten, Ctrl/Cmd a tenth; trackpad and fine-wheel points add up to notches. The new value is applied at once and selected.DragValues become the same recessed number fields (widgets::range_field: clamped to their range and rounded to their precision), so they type, step and scroll like the rest (Effect gamma, the generic command/effect/plug-in parameters, Layer and Layers Panel Options, PNG/JPEG/GIF and Save for Web counts, export options, numeric preferences).docs/control-protocol.mdui.wheel), ROADMAP (Last updated, the number-field bullet). No new UI strings.Illustrator reference: values in panels and dialogs step with the arrow keys once the field is clicked (Set precise property values); the wheel steps a field the same way after it is clicked (black-box behaviour; helpx doesn't mention the wheel).
Checks
d9fc3b6505bb185c7ecce05ab4b60b86da12822f(origin/main).cargo fmt --all --check;cargo clippy -p vectorcraft-ui-egui --all-targets -- -D warnings: clean.cargo test -p vectorcraft-ui-egui: 714 passed. New:the_wheel_steps_a_focused_field_under_the_pointer(lines, Shift/Ctrl, points carried over, unfocused and pointer-elsewhere do nothing, plain fields) andthe_wheel_scrolls_the_panel_unless_over_the_focused_field(a ScrollArea scrolls over an unfocused field, stays put over the focused one). Both fail on main.cargo xtask layers,cargo xtask brands,cargo xtask wasm: OK;cargo check -p vectorcraft-ui-egui --target x86_64-unknown-linux-gnu / aarch64-apple-darwin: OK.ui.wheel/ui.click/ui.screenshot): Control bar W: wheel over it unfocused → unchanged; clicked, +1 notch → 35.2778 → 36.278 mm, Shift +2 → 56.278, Ctrl −1 → 56.178 (value selected); the wheel over the canvas with the field focused leaves the value alone. Preferences › Smart Guides › Snapping Tolerance (a former drag value): clicked, +2 notches → 4 pt → 6 pt (dialog cancelled).🤖 Generated with Claude Code