Commit Graph
5 Commits
Author SHA1 Message Date
BFlat 6f37bd839c VectorCraft on the craft UI framework (#8800)
VectorCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (`next`; the framework side is storytold/craft-libs#2809), as PhotoCraft's did. The app keeps its engine, document model, file formats, commands and automation; its windows, panels, bars, dialogs and canvas are now built and driven by the framework: shell, docking and panels, hosted dialogs, keyboard, focus, IME and pointer routing, and theme tokens.

About 264,000 lines of VectorCraft's own egui UI code are removed and about 154,000 added. craft-libs is pinned at bf62d509f (in `next`), the egui fork at f5025284.

Tests that drove the old UI were rewritten against the port where only their premise changed, with their assertions kept. The UI tests still failing at merge, and their follow-ups, are listed in the pull request.
2026-11-24 08:25:24 +07:00
dotCooCoo 125ab66348 Selection: on-canvas widgets check an object's kind before its editability
The type, pie, side count and corner widgets, the Objects on Path, Mirror,
Grid and Radial Repeat controls, the Image Trace Split divider and the
center point now check that a selected object is of a kind that has the
widget before asking whether it is editable. With an artboard locked, the
editability check measures the art of the layer object holding the object,
so a large selected group of another kind was measured on every repaint and
pointer move. The widgets shown are the same.

A test-only counter (vectorcraft-doc feature locked-artboard-count) counts
those measurements; widget_order_tests checks that objects of other kinds
are not measured, compares every widget with the editability-first result
on a mixed document, and holds an ignored timing test, widget_order_perf.
2026-11-20 15:03:29 -08:00
dotCooCoo 61cc30e9b8 Image Trace: a shown center point keeps its drag over the divider
With Show Center on, a press on a selected Image Trace object's center
point where the Split view's divider crosses it moved the divider
instead of the object. The divider now leaves a press on a shown center
point to the Selection tool, as it already did for the bounding-box
handles.
2026-11-18 16:40:27 -08:00
dotCooCoo e9650d17a4 Image Trace: switching tools during a divider drag puts the view back
Switching away from the Selection tool while dragging the Split view's
divider left the drag's interaction open with its preview in the
document. The Selection tool now cancels the drag on deactivate, as
Escape does, as it already did for the corner, pie, side and blend
widgets.
2026-11-18 16:09:36 -08:00
dotCooCoo 24f064b01e Image Trace: Split View shows the source image and the result on either side of a divider
A sixth Image Trace View, Split View, draws the source image on the part
of the image left of a divider across it, and the tracing result
everywhere else, art past the image's edges included. The divider
follows the image's own width, so it turns with the image, and it works
at any zoom and view rotation. Each side is drawn once under a plain
clip; exports, printing and Expand still draw the tracing result.

- imageTrace.setView takes view "split" and split (0 to 1, default
  0.5). A split outside 0 to 1, or one that is not a number, is an
  error. The object keeps the divider when another view is set and when
  it is traced again, and setting the same view and divider adds no
  undo step.
- With one such object selected, the Selection tool drags the divider
  as one undo step, and Escape cancels the drag. The divider is hidden
  and cannot be dragged with the bounding box hidden or in Outline mode.
- The Image Trace and Properties panels show a Divider slider that the
  arrow keys move a percent at a time, named for screen readers.
- The catalogs gain rows for Split View and Divider (all but gu, which
  has no Image Trace rows).
2026-11-16 08:32:58 -08:00