still_wait started its STILL_SECS wait again whenever the cache key
asked for changed, and the key holds the document's revision. After a
heavy document's view moved and stopped while a drag went on editing
it, each edit was drawn into the frame shown and restarted the wait,
so the canvas never rendered whole for the view while the edits went
on. The wait now starts again only when the document or the view
(zoom, centre, size, pixel density, rotation, Pixel Preview's pixels)
changes. The checks that render at once when more than the view
differs from the frame shown are unchanged.
Refs #8688
In the web build (no render worker), while the view of a document whose
last render took more than 8 ms moves, the canvas draws the last frame
moved with the view and renders once the view is still. An edit in
that time rendered the whole canvas at the new view, every frame: a
tool drag held at an edge of the canvas (#8551) or a wheel scroll during
a drag did that on each step.
Such an edit is now drawn into the frame shown, at the view it was
rendered for: only the part the edit changed (changed_pixels). The
frame stays drawn reprojected and renders whole once the view has been
still for STILL_SECS, as for a view change without an edit. An edit
that changes more than half of the frame, or one while more than the
view and the document change, renders whole at once as before. The
partial redraw of draw_frame moves into draw_changed, shared by both.
Fixes#8688
A dimmed row's hover painted the lighter hover fill, which left its dim
text at 4.3:1 in the default Charcoal theme and at 4.1:1 in Classic Dark,
under the 4.5:1 the dim colour is drawn for. A dimmed row can't be dragged
in again, so its hover is now a recess in the panel's darker fill, which
keeps 4.5:1 or better in every colour scheme and brightness.
The docs now give the measured range: 4.5:1 or better on the panel in every
Modern brightness and in Classic's lightest and darkest settings, 5.4:1 in
the default theme, and Classic's own dim text at 3.55:1 at its middle-dark
brightness, which the drawer draws as that palette does.
Tests: a_hovered_dimmed_row_stays_readable (new) checks the hover fill and
its contrast in both schemes and all four brightnesses;
tools_in_the_toolbar_are_dimmed_in_the_drawer now covers every palette too.
Review follow-up for #8551:
- The press position is where the primary button went down, not where
the frame's input left the pointer: a press and a move to the edge in
one input batch has dragged, and holding still there now scrolls.
- Any move of a frame that goes 3 points from the press arms edge
scrolling, not only the frame's last position: a move away and back
within one frame still dragged.
- docs/roadmap.md: the M11 row, status line and revision history mention
the edge scrolling; the View & navigation row points to its evidence.
Answers the CodeRabbit review on #8653.
A glyph kept as an outline ends the open line, so the next mapped glyph
went through park_text's fallback arm into flush_text, which forgot the
lost glyphs in the middle of the fill pass. flush_text is now
finish_text plus forgetting them, and park_text calls finish_text:
starting a new line draws nothing else, so it is never a boundary.
Docs: the M4 roadmap row names this follow-up.
Retain the owned canvas aperture and upstream modal opened-state handling,
keep both appended test functions and complete documentation histories, and
pass None in the new ordinary-modal test call.
Since #8549 the glyphs of lines finished past MAX_PARKED were kept
until the next stroke and, past 4096 of them, matched every stroke.
A `2 Tr` word after a dense page of filled-only type then came in as a
filled object and a stroked one.
- flush_text forgets them: nothing is drawn between an operator's fill
pass and its stroke pass. end_text keeps them, since it also runs
mid fill pass for a glyph kept as an outline.
- LostFills keeps the first 4096 glyphs and matches only those; there
is no overflow that matches every stroke.
- replayed counts the lines its `left` check looks at toward
MAX_REPLAY_WORK.
Conflicts in docs only (status lines, changelog rows and table rows):
main's entries and this branch's are both kept, each once. Main now has
this branch's first File formats row fix (#868) itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* SVG export: preserve document unit in viewBox and width/height (#864)
When exporting SVG documents with physical units (mm, cm, in, pc), emit
the physical unit suffix on the root <svg width=... height=...>
attributes while keeping viewBox numbers and inner coordinates in 1:1 points
per SVG 1.1 coords §7.10. This avoids the 75% scaling mismatch when opening
drawings in external tools such as Inkscape or LightBurn, and preserves
the document unit setting across save/open round trips. Unitless documents
(points, pixels) continue to emit unitless dimensions.
Tested via export_physical_units_writes_unit_suffixes in vectorcraft-svg
and full round-trip svg_round_trip_preserves_document_units in vectorcraft-engine.
Ran cargo xtask ci (fmt, clippy, tests, xtask gates).
* SVG export: preserve nonzero width and viewBox on extreme small dimensions