Repository navigation
Fix #1876: Artboard Options has X and Y with a reference point - #2739
Merged
bflatastic merged 1 commit intoOct 17, 2026
Merged
Conversation
Artboard Options showed Name, Width and Height only: the generic form hides x and y, which in the shape dialogs are the click position. The artboard's position could be dragged but not typed. The dialog now draws its own rows after the form's, in the same grid: the reference point locator the Transform panel, the Control bar and Properties share, then X and Y. They show where the reference point lies, counted from the ruler origin (storytold#1212), as the Transform panel and the Control bar show an artboard's position. A typed X or Y moves the artboard so that its reference point lands there, and a new Width or Height keeps the reference point in place. The fields still hold the top-left corner in document points, so OK runs artboard.setProps as before, in one undo step. The shape dialogs keep their x and y hidden. form::grid_then lets a dialog add rows to the generic grid.
bflatastic
force-pushed
the
fix/1876-artboard-options-xy
branch
from
October 17, 2026 18:48
6d39ee5 to
2a5dfa6
Compare
Member
|
Thanks @guillehr2, merged. It went through the full gate (fmt, clippy, tests, layers, wasm) in today's batch. If you're not on our Discord yet, come join us: https://discord.gg/artcraft |
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.
What and why
Fixes #1876. The reporter needs to adjust an artboard precisely. #2032 made the Artboards panel's options icon and menu open Artboard Options, but the dialog only has Name, Width and Height. The generic form (
dialogs/form.rs) hidesxandyfor every dialog, because in the shape dialogs they are the click position. So an artboard's position could be dragged but not typed.Artboard Options now shows X and Y after Width and Height, in the same grid, with the reference point locator before X:
panels::transform::artboard_rectas the panels.confirmdoesn't change:artboard.setProps(artboard.newfor Alt-click on New Artboard) in one undo step.ui.newArtboard) gets the same rows, so a new artboard's position can be typed too.form::gridstill hides theirxandy. The newform::grid_thenlets a dialog add rows to the generic grid, so the labels and fields line up.Public references:
Docs:
docs/target-app-parity.md: an evidence line under the artboards, the status line and the revision history. Scores unchanged.docs/ui-parity.md: a row in the artboards section, the status line and the revision history.docs/mcp.md: the dialog'sxandyare the top-left corner in document points, while the dialog shows X and Y at the reference point, counted from the ruler origin.How it was tested
New headless pointer and key tests in
crates/ui-egui/src/dialogs/tests.rs, on a 400 × 300 pt artboard with the ruler origin at (120, 50):artboard_options_x_and_y_count_from_the_ruler_origin_at_the_reference_point:artboard_options_size_keeps_the_reference_point:Both fail on
main(the dialog has no X). With only the size part of the change reverted, the second fails (X reads 130 pt) and the first passes.Frames::buttonnow goes through a newFrames::control(label, role), which also finds the locator's squares.Checks, on
mainat f7de3d6:cargo fmt --all -- --check.cargo clippy -p vectorcraft-ui-egui --all-targets -- -D warnings.cargo test -p vectorcraft-ui-egui --lib dialogs::tests: 166 passed.cargo test -p vectorcraft-ui-egui: 1583 passed on the earlier base, 8c10185. Rebasing onto f7de3d6 conflicted only indocs/target-app-parity.md.Screenshots from the headless
egui_kittest(wgpu) harness, drawn the waydialogs/save_options.rsandpanels/image_trace.rsdraw theirs: Medium Dark, the same 400 × 300 pt artboard and ruler origin. The capture code was a local test and isn't in this PR.Before / after:
Merging with open PRs
dialogs/artboard_options.rs, and indialogs/tests.rs, where both add tests after the same test. Keeping both sides resolves them.form::grid_thenwith the X and Y rows, then adds the Background Color row.dialogs/tests.rs: keep both.Not in this PR
Checklist
cargo xtask cipasses (fmt, clippy, tests, assets, brands, layers, wasm). Not the full run: fmt, and clippy and the tests of the changed crate (vectorcraft-ui-egui), were run locally.unwrap(),expect(),panic!,unreachable!,todo!orunimplemented!outside tests, and no unchecked indexing on data from files, parameters ormessages. Errors are returned as
Resultand shown to the user(why and how).
ASSETS.md. (No new assets.)