Commit Graph
235 Commits
Author SHA1 Message Date
Codex 1937db57bf Restore native save dialogs, selected Hand panning and font list space 2026-11-30 11:33:11 +01:00
dotCooCoo 340edf90b2 Merge main into fix/missing-fonts-check-once 2026-11-29 11:42:08 -08:00
dotCooCoo c7487a4657 Missing Fonts: the frame after an open lists a document's missing fonts once
The frame after a document opens checked whether its Missing Fonts dialog
waits by building the whole dialog (opening::may_switch), and the dialog
pump then built it again to open it. Each build walked the document's type
and resolved every font it names: 6.5 ms over the two calls at 20,000
objects.

The rows are now kept in CanvasCache::missing_fonts for the document's
content version and the font database's generation, the same key Type ›
Find Font's cache uses, and both calls read them. An edit or a font that
loads while the dialog waits makes the next call list the fonts again. The
Fonts folder next to the document is still looked up when the dialog opens.
Rows are dropped once their document no longer waits.

text.missingFonts's answer is unchanged; its rows and its folder are now
two engine functions, missing_font_rows and fonts_next_to_document.

Tests count the row lists (one for the check and the open together) and
check that a document edited while its dialog waits lists its new font.
2026-11-29 11:42:07 -08:00
.CooCoo ed097438f0 Merge pull request #10102 from dotCooCoo/fix/new-document-card-tiles
New Document: preset cards rest on a tile
2026-11-29 11:25:59 -08:00
dotCooCoo 599426f075 New Document: preset cards rest on a tile
The app's root look now sets PresetCardLook::PageTile in place of Page,
so each preset card in New Document draws on a light veil of the scrim
with its paper on it. A card that is not selected now stands apart from
the dialog's surface. The craft-libs pin at 186a229c8d already has the
look (storytold/craft-libs#4180).

The new test resting_preset_cards_stand_on_a_tile checks that a resting
card is covered by a veil of the scrim and holds its white paper; it
fails with the old Page look.
2026-11-29 10:14:35 -08:00
ruchirguitar a4659724f6 Merge main into feat/spell-check
Cargo.toml: #10049 moved craft-libs to 186a229c; the font store crates this
branch adds move with it, so every craft-libs crate stays at one rev.
2026-11-29 22:41:45 +05:30
dotCooCoo 8254c2f6d4 Slices: a refused OK keeps Slice Options and Divide Slices open with what was typed
Both dialogs closed on OK before the app checked the document and slices
they opened with, so a refusal (the selection changed, the document was
reverted, or the command failed) went to the status line and the typed
values were lost. They now open through the held-OK host: the check and
the command run while the dialog waits, a refusal shows its reason under
the rows with the values kept, and OK applies once the opening slices are
selected again.
2026-11-28 23:10:00 -08:00
ruchirguitar 8d3895d491 Merge main into feat/spell-check
Cargo.toml: main moved craft-libs to 610c8679; the font store crates this
branch adds move with it, so every craft-libs crate stays at one rev.
2026-11-29 08:29:24 +05:30
.CooCoo a637f843c6 Merge pull request #10014 from dotCooCoo/fix/speed-i13853-cursor
Canvas: a wheel pan or zoom keeps the tool's cursor until the view is still
2026-11-28 17:28:54 -08:00
dotCooCoo f3c56a9091 Merge main into fix/speed-i13853-cursor 2026-11-28 15:55:48 -08:00
dotCooCoo b6598491f5 Canvas: a wheel pan or zoom keeps the tool's cursor until the view is still
The tool host asks the canvas tool for its cursor in every pass with the
pointer over the canvas. The selection tools answer by hit-testing the
art under the pointer, so each frame of a wheel pan or zoom under a
resting pointer walked every object. The canvas now keeps the cursor
the tool last gave for the same tool and keys while the view moves,
and asks again once the view has been still for HOVER_STILL_SECS, as
it already does for Object Highlighting and the shown tool (#2452).
2026-11-28 15:32:25 -08:00
dotCooCoo ee05541d99 Canvas: the selection's marks are built once per change
The canvas built the outlines, anchors and dots of the selection again in
every pass, walking every selected object three times (the outlines, the
anchors and the dots each count the marks first). They are now kept in the
canvas cache with a key of the document's uid and revision, what the view
hides, Halftone Preview, the tool whose marks show and the Selection &
Anchor Display preferences, and built again only when that key changes.

With 10,000 rectangles selected, an idle frame went from about 290 ms to
about 210 ms on the build host.
2026-11-28 14:28:58 -08:00
dotCooCoo e86a08ef9e Canvas: measure the document once per revision, replay the status bar navigation
The canvas measured the art and artboards of the whole document in every
pass to size its view target, so a frame cost grew with the object count.
view_target now reads content_bounds_of, which keeps one measure per open
document and measures again only when that document's revision moves.

The status bar's Zoom field, Rotation menu and artboard navigator now show
in a MemoView keyed on the view, the artboard, the document revision and
the language, so idle frames replay them instead of laying them out.
2026-11-28 12:15:52 -08:00
ruchirguitarandClaude Opus 5.5 38da965223 Merge main into feat/spell-check
As asked in review. Cargo.toml: main moved craft-libs to 51fcc3b0; the font
store crates this branch adds move with it, so every craft-libs crate stays
at one rev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 21:54:53 +05:30
dotCooCoo 875f49fc8d Merge main into feat/plugins-web-worker
The plug-in runtime keeps main's JavaScript plug-ins beside the web worker's module bytes and checked loads: a JavaScript plug-in's bundle is kept for the worker like a module, and load_checked loads it from its bundle.
2026-11-27 23:05:07 -08:00
.CooCoo 0b07f8b0bd Merge pull request #9842 from dotCooCoo/fix/screenshot-test-app-clock
Tests: the screenshot trial steps the app's clock instead of the wall clock
2026-11-27 21:36:16 -08:00
.CooCoo 77a609eed6 Merge pull request #9820 from dotCooCoo/chore/craft-libs-pin-51fcc3b0
Dependencies: take every craft-libs crate from craft-libs main at 51fcc3b041
2026-11-27 21:35:36 -08:00
BFlat f59a5a1892 Merge pull request #9621 from dotCooCoo/fix/panel-artwork-drop-file-revert
Reject panel artwork drags started before File Revert
2026-11-28 11:18:00 +07:00
dotCooCoo fec0e5ab75 Tests: the screenshot trial steps the app's clock instead of the wall clock
tests::automation::a_screenshot_is_issued_by_the_apps_frames_and_written
failed on a loaded machine with "screenshot 0 timed out: no frame was
presented within 8 s": the capture's settle delay and its 8 s deadline
started on the wall clock inside ControlChannel::settle, so a slow run
reached the deadline before a frame issued the capture.

The app now times control requests and captures on its own clock,
VectorcraftApp::instant: the monotonic clock, or now_override seconds
after the app was made when a test sets it. run_control admits each
screenshot with ControlChannel::settle_at at that instant, and the
drain, the request-expiry check and issue_captures read the same
clock. Behavior outside tests is unchanged.

The test starts the app's clock twice the deadline past the wall clock
and steps it one frame per pass, so the capture is issued after its
settle delay on that clock. With the admission or issue still on the
wall clock, the test fails with the timeout error above.
2026-11-27 16:45:53 -08:00
dotCooCoo a0d922c0f2 Dependencies: take every craft-libs crate from craft-libs main at 51fcc3b041
All storytold/craft-libs crates and the hayro, krilla and linesweeper
patches move from b0d422cf0c to 51fcc3b041, the head of craft-libs main
(craft-libs#3718). craft-libs main now holds what was on next, so the
pin follows main as AGENTS.md rule 10 asks. The move brings the .cmx
writer (craft-libs#2807) and the macOS Save sheet Format menu
(craft-libs#3565). xtask pdf-deps expects the new rev.

The egui patches move from b15ffe9bfc to 932a73b285, the egui rev
craft-libs main pins: craft-ui-contract at 51fcc3b041 calls
Context::set_pointer_move_gate and Context::widgets_at, which
storytold/egui adds after b15ffe9bfc.

App changes the move needs:
- AppShell's title, options, status and hint slots take a version
  function (craft-libs c417cd3050). Each passes |_| None, so every slot
  still runs in every pass.
- PartResult::hover_pos is private (craft-libs 27e8a77145). The track
  cube reads the pointer through Cx::hover_pos, which is None when the
  cube is not hovered, as the old filter on hovered was.
- craft_dxf::write_binary returns a Result (craft-libs#3347, binary DXF
  writing fails on an invalid integer). The binary DXF import test
  unwraps it.

Test changes the move needs:
- An inline slider field now shows its slider before its number field,
  and both carry the field's name (craft-libs#3553). The panel harness
  types into the number field, the part that takes typing, and the
  plug-in effect test reads the number field's value.
- A painted tool cursor's marks use the overlay.cursor token (craft-libs
  a830ff539b), so the cursor test looks for that color.
- The Keyboard Shortcuts area tabs are named by their visible label,
  "Show:" (craft-libs 702cb295c6).
- The gradient stop's color mode menu now opens over part of the stop
  editor. The test clicks the Web Color Sliders row where it lies
  outside the editor, as before, and keeps the same checks.

Cargo.lock adds what the new craft-libs crates depend on
(craft-control-protocol, craft-font-os-windows, ed25519-dalek and its
dependencies, jpeg-encoder 0.7.1 for craft-image-codecs).
2026-11-27 15:53:24 -08:00
ruchirguitarandClaude Opus 5.5 44afcbfb2a Spell-check other languages from the Craft apps' Language packs
Part of #4936. Spelling and hyphenation now read the Language packs
installed in the font store the Craft apps share, and proof.packs,
proof.installPack and proof.removePack list, install and remove them.
Installs need downloading on, which only the person turns on; in the
desktop app they run in the background and the documents are laid out
again when one ends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 21:19:24 +05:30
dotCooCoo b926789087 Reject Graphics drops from a reverted 3D drawing 2026-11-26 21:45:43 -08:00
dotCooCoo 84c5bc0e33 Merge current VectorCraft main into Slice Options and Divide Slices 2026-11-26 19:49:49 -08:00
dotCooCoo 9e085ff4f5 Merge current VectorCraft main into Slice dialog selection guard 2026-11-26 16:55:25 -08:00
dotCooCoo 76dbfa881c Keep web patch state together in the canvas cache 2026-11-26 16:49:25 -08:00
dotCooCoo a01b7a3935 Reuse web canvas pixels outside view-sensitive effect bounds 2026-11-26 16:30:14 -08:00
BFlat 534efa89ad Merge pull request #9517 from dotCooCoo/fix/ui-package-opening-drawing
Keep Package tied to its opening drawing
2026-11-27 07:27:15 +07:00
BFlat 571d19face Merge pull request #9416 from dotCooCoo/fix/press-frame-view-sized
Redraw the first Pen drag frame without raster seams
2026-11-27 07:24:13 +07:00
dotCooCoo 83ec68a750 Merge commit '5c7bbeecaa1e9481eb784f1ffc2062529872505d' into fix/ui-slice-dialog-selection 2026-11-26 15:30:23 -08:00
dotCooCoo 71227812ff Merge commit '5c7bbeecaa1e9481eb784f1ffc2062529872505d' into fix/ui-package-opening-drawing 2026-11-26 15:30:23 -08:00
dotCooCoo 4974b14c53 Keep Package tied to its opening document 2026-11-26 14:46:15 -08:00
BFlat 990887e5c2 Merge pull request #9487 from dotCooCoo/fix/ui-document-setup-document
Keep Document Setup changes with their document
2026-11-27 05:26:11 +07:00
BFlat a431537d95 Merge pull request #8823 from dotCooCoo/feat/retype-installed-fonts
Retype: installed fonts that are not loaded yet are matched too
2026-11-27 05:09:16 +07:00
dotCooCoo 8bc385823f Keep slice dialog actions on their opening selection 2026-11-26 13:41:27 -08:00
dotCooCoo bd619b9222 Bind Document Setup actions to their source document 2026-11-26 13:22:48 -08:00
dotCooCoo 93b7a9c627 Merge main into feat/plugins-web-worker 2026-11-26 10:32:00 -08:00
dotCooCoo dc333ada97 Merge main into feat/plugins-web-worker
Worker completion preserves unapplied typing and discards stale output.
2026-11-26 10:21:21 -08:00
dotCooCoo 1ce83be83e Use one supported UI scale for the interface and canvas 2026-11-26 08:38:20 -08:00
BFlat f040538a39 Merge pull request #9007 from dotCooCoo/feat/windows-stylus-wheel-wintab
Windows: the Paintbrush reads an airbrush pen's stylus wheel through Wintab
2026-11-26 23:20:15 +07:00
dotCooCoo 1eff539ff6 Redraw the first Pen drag frame and keep partial raster edits consistent 2026-11-26 07:18:55 -08:00
dotCooCoo cb89cd5ef3 Clear pending Type edit when the missing font prompt closes 2026-11-26 07:16:16 -08:00
BFlat 3a57f44f48 Merge branch 'main' into fix/reset-preferences-interface-settings 2026-11-26 21:22:33 +07:00
BFlat 541b316780 Merge pull request #9369 from dotCooCoo/fix/pen-drag-curve-lag
Canvas: a drag over a frame the render worker drew shows the edit in the frame it is made in
2026-11-26 16:45:46 +07:00
dotCooCoo fb68251203 Cursors: Use Precise Cursors and Caps Lock hide the brush tip outline again
The view info the canvas gives the tools never set its precise flag, so
the Blob Brush and the Eraser drew their tip outline around the precise
crosshair whatever the setting. Nothing passed the host's Caps Lock
state to the session either, so `view.capsLock` changed nothing.

- The view info's precise flag is on while Use Precise Cursors or Caps
  Lock is on, as before the move to the shared canvas.
- The canvas passes each change of the host's Caps Lock state to
  `view.capsLock`; a `view.capsLock` call stays in effect until the next
  change.
- The canvas's pointer follows the same flag, so with both on the
  drawing tools keep the crosshair.
2026-11-25 21:43:49 -08:00
dotCooCoo a9c4e259f9 Canvas: a drag over a frame the render worker drew shows the edit in the frame it is made in
In a document whose frames take over 8 ms, every frame of an edit went to
the render worker once the frame shown came from it, so a Pen drag's curve
trailed the pointer by the worker's render time plus the wait for a busy
worker. The changed part of a worker's frame is now drawn again on the UI
thread, as it already was for frames rendered there, when the part's share
of the frame's last render time is at most 8 ms.

The part is not drawn there, and the frame goes to the worker as before,
when the frame shown drew raster effects made before their objects moved,
holds pixels copied from the worker's last frame, or drew art in a way that
depends on the frame's size, or when the part itself draws such art. A
worker frame on its way blocks the part only when it is of another document
or not older than the edit.

Part of #8296.
2026-11-25 21:26:27 -08:00
dotCooCoo cb1361c889 Merge main into feat/plugins-web-worker 2026-11-25 18:45:04 -08:00
dotCooCoo 478ed51ace Merge main into feat/retype-installed-fonts 2026-11-25 18:40:00 -08:00
dotCooCoo b6b702f080 Merge main into fix/reset-preferences-interface-settings 2026-11-25 18:36:58 -08:00
dotCooCoo 0bda609041 Merge main into feat/windows-stylus-wheel-wintab 2026-11-25 17:56:18 -08:00
dotCooCoo 7418753350 Windows: the Wintab context opens only while the tool uses the wheel
The Paintbrush with a brush whose Size or Width is on Stylus Wheel with
a range the wheel can change, or the Eraser with a value on Stylus Wheel
and a variation above 0, uses the wheel. The app asks the active tool
(Tool::reads_wheel) once a frame and tells the host when the answer
changes (Services::stylus_wheel). Until a tool uses the wheel, a pen
message loads no Wintab32.dll, installs no hook, subclasses no window
and opens no context; when it stops, the context closes.
2026-11-25 17:53:48 -08:00