Commit Graph
15 Commits
Author SHA1 Message Date
dotCooCoo e206b0a7af Keep Print presets while the drawing preview is paused 2026-11-26 15:47:47 -08:00
dotCooCoo b801e1b9d3 Keep Print attached to the original drawing 2026-11-26 15:00:03 -08:00
dotCooCoo adad041917 Merge main into fix/print-dialog-field-names
Both dialogs now run on the craft UI framework, which names the fields from their labels. The field-name tests are rewritten to read the framework's accessibility tree.
2026-11-26 00:40:15 -08:00
dotCooCoo 2de7c7de82 Merge main into fix/ui-port-text-divider-notice 2026-11-24 22:59:44 -08:00
dotCooCoo bf4b1fb01f Print: the printer row shows Setup… for the printer chosen
The Print dialog never set the framework dialog's driver controls, so
the printer row had no Setup… button and print.printerSetup could not
be reached from the dialog.

- The row shows Setup… when the print service can open printer
  settings and the destination is a printer. For PDF File, and when
  the service cannot open printer settings, the row has no Setup….
  Before the port the dialog showed the button disabled in those
  cases, with a tooltip; the framework's printer row can only show or
  hide it, so it is now hidden and has no tooltip.
- The pump sets the controls after the frame has drawn the row, so
  a change of printer shows on the next frame. The pump asks for that
  frame when the controls change, and the row updates without waiting
  for input.
- A Setup… press while no printer settings are available is ignored.
2026-11-24 16:35:13 -08:00
dotCooCoo 2447f9e358 UI: dialog and panel labels, separators and notices use Text, Divider and Notice
Labels drawn with raw `ui.label` and `ui.weak` in the Export As, DXF,
EPS, HP-GL, PNG, Simplify, Map Art, Print and Save Options dialogs and
in the Graphic Styles and Layers panels now use the framework's Text,
so each one is in the accessibility tree. The hints under the export
dialogs and the Layers footer count use the caption role in the muted
shade. The Print Summary rows are selectable text named Pages, Options
and Warnings.

The Stroke panel and the Swatches library menu draw their separators
with Divider. The HP-GL pen error and the kinsoku set problem show as
an inline Notice in the bad tone and are announced as alerts, and the
legacy .ai artboard note shows as an info Notice.

The Art Brush Options Direction segments are arrow icons with the
tooltips Left to Right, Right to Left, Top to Bottom and Bottom to Top,
and a screen reader reads those names instead of the arrow glyphs. The
app's icon set gains left and right arrows drawn like the existing up
and down arrows.
2026-11-24 16:27:19 -08:00
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 68df6224ea Accessibility: Save PDF and Print name every number and length field
Screen readers found six image resolution fields in Save PDF with no
name, and the four bleed fields were not connected to their labels. In
Print, the artboard Range field had no name, Width and Height were both
named Width:, Placement X and Y both Placement:, and Scale W and H both
Scale:.

- save_pdf::number_named and length_named take a name for a field that
  shares its row or has none; number and length keep naming a field by
  its row.
- The resolution fields are named by their group and the word before
  them (Color images to, Color images above), the bleed fields by their
  side, Width and Height by their own labels, and Placement and Scale by
  the row and the axis.
- No visible text changes.

Tests: dialogs::save_pdf::tests and dialogs::tests_print
every_number_and_length_field_is_named_by_its_label.
2026-11-22 07:06:17 -08:00
dotCooCoo 5811cab523 Part of #5941: dialogs too large for the window scroll instead of running off the screen
A dialog taller than the app window was drawn past the window's edges
with no scroll bar. In a 1024 by 480 window, SVG, EPS and DXF Options,
Save PDF, Export for Screens, Print, Keyboard Shortcuts and Find Font ran
past the top, so their heading and first options could not be seen. Save
for Web, Preferences and New Document also ran past the bottom, with
their buttons out of reach.

- The body of a shared dialog scrolls while the dialog would be taller
  than the window, and its heading and buttons stay in view.
- A dialog window without such a body scrolls as a whole on each axis on
  which it is taller or wider than the window. Its buttons can then sit
  below or beside the part in view until it is scrolled.
- A dialog that sizes its lists from the window's height (Import
  Shortcut Set, Character and Paragraph Style Options, the Color Picker)
  is not scrolled vertically again, but it scrolls sideways when it is
  wider than the window.
- A list with its own scroll bar inside a scrolling body (the Save for
  Web settings, the Print and Save PDF sections) is no taller than the
  body shows, so the list and its bar can be scrolled into view whole.
- A dialog that closes and opens again starts at its top. A dialog that
  was only hidden while another opened over it (Keyboard Shortcuts under
  Import Shortcut Set) keeps where it was scrolled to.
- A field being edited keeps its text and focus when a resize makes the
  dialog start or stop scrolling.
- Save for Web in a window narrower than its full layout draws its
  preview panes narrower, down to 240 pt, so the settings column and the
  buttons stay in view.

Reported by erolkarino in #5941.
2026-11-17 21:00:34 -08:00
dotCooCoo 086810b9aa Print: a typed Scale W or H is the base for the next linked change
With the link on, a W or H typed in the dialog sets both fields, but the
values the link compares a later change against stayed at the ones from
before the edit. A height set through ui.dialog.set before the next frame
then matched neither, so W and H stayed apart and Done refused them. The
dialog now remembers W and H after a typed edit.
2026-11-16 16:26:24 -08:00
dotCooCoo 757b4f7b8f Print: Document Ink Options converts one chosen spot ink to process
Each spot ink in the Output section's Document Ink Options list now has
an icon before its name. Clicking it prints that ink as process: its art
separates onto the process plates and it gets no plate of its own, while
the other spot inks keep theirs. Clicking again keeps it as a spot ink.
While Convert All Spot Colors to Process is on, every spot ink converts
and the icons are dimmed; each ink keeps its own choice for when the
option is turned off. A converted ink's Print box, frequency and angle
are dimmed.

file.print and print.preview take convertToProcess on an output.inks
entry, and print.preview lists every document ink, converted ones
included, in documentInks.
2026-11-16 14:36:05 -08:00
dotCooCoo b2a1e86fe9 Print: a link button keeps Custom Scale W and H equal
The Print dialog's General section (and the print preset editor) gets a
link button after Scale W and H. While it is on, typing either percentage
sets the other, and turning it on sets H to W. It is on for new settings,
dimmed with the fields unless Scaling is Custom or a tiling choice,
toggled with a click, Space or Enter, and screen readers hear its name
and on or off state. W and H now take 1 to 1000 %.

The link is saved as scale.linked with the other print settings, in the
document and in print presets. A scale saved without it reads as unlinked,
so earlier settings print as they did. print.setup, print.preview,
file.print and print.presets.save apply the same rules: one percentage
sets the other while linked, a different width and height without a
linked key turn the link off, and with linked: true (or linked: null over
a linked scale) they are an error.
2026-11-16 09:27:38 -08:00
dotCooCoo b1236c469b Print: Copies per Sheet prints as many copies of each artboard as fit the sheet
File › Print printed each artboard on a sheet of its own. A 2 × 3.5 in
card on Letter printed once in the middle of the page, and Print had no
option to fill the sheet with copies.

The Print dialog's General section has Copies per Sheet (off by
default) and a Gutter. With it on, a sheet holds as many copies of the
artboard as fit the imageable area, each with its bleed and marks,
across then down, gutter pt apart. The card prints 4 × 3 on Letter,
and 3 × 3 with an 18 pt gutter. The copies are not turned, and the
placement places the whole grid as it places one copy. An artboard
that does not fit prints one copy per sheet with a warning, and more
than 1,000 copies on a sheet is an error. Tiling leaves the option
out. The PDF and PostScript writers draw the art and the marks once
per copy, the PDF TrimBox holds every copy, the preview draws each
copy, and print.preview lists them as `copies`. With the option off,
the layout lists no copies and the writers draw the page as before.

Docs: docs/mcp.md (Print, Printing), docs/target-app-parity.md.
2026-11-08 17:22:46 -08:00
Chris MainandClaude Opus 5.5 41430cc171 Print: landscape pages print upright on macOS print queues
A landscape print job was a page wider than tall, and `lp` on macOS puts
each page on the paper as it is: on upright Letter it printed unturned,
cut off on the right (checked with cupsfilter through an AirPrint
driver). Saving the PDF and printing it from Preview worked because
Preview turns the page.

`file.print` takes `forPrinter`: a page wider than tall is written
upright, the art turned a quarter anticlockwise as a printer driver turns
a landscape job. Page by page, so auto-rotated jobs that mix wide and tall
artboards print right too. The desktop print service asks for it
(`PrintService::turns_landscape`); saved PDFs, PostScript, the preview and
the browser's print dialog keep landscape pages as they are.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 17:29:32 +07:00
bflatasticandClaude Opus 5.5 ffce1cf686 M4.78: File > Print opens the Print dialog and prints through the system
The Print dialog (Ctrl/Cmd+P) edits the document's print settings in the
sections General, Marks and Bleed, Output, Graphics, Color Management,
Advanced and Summary, with a preview of each printed page under the section
list (drag the art to move its placement). It drives print.setup,
print.preview and file.print; the preview pages now carry their transform,
printed area and trim box. Print sends the job's PDF to the chosen printer
through the new PrintService (lp on macOS/Linux, the shell print verb on
Windows, a hidden frame and the browser's print dialog on the web); without
one, or with PDF File, it saves the PDF. Done only keeps the settings.
UI commands file.print, print.printers and print.printerSetup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 16:30:35 +07:00