Exporting the window for the portal waits for the compositor to answer. The
sampler now does it on its worker thread, as the portal's save dialog does,
so a slow compositor does not hold up the UI.
On Linux, ui.sampleScreenColor and the Color Picker's eyedropper button
now show the XDG desktop portal's color sampler (Screenshot.PickColor,
https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Screenshot.html).
A thread of its own makes the call and waits for the person, and the
picked sRGB color goes through the same conversion into the working RGB
space as on macOS and the web. A cancel leaves the colors as they were.
A session without a portal that has PickColor, a portal that does not
return from the call within 25 seconds (VectorCraft's own limit) or
leaves the bus before it answers, and a portal that ends the request in
another way each show a status message and end the wait. The two new
messages are translated in every catalog that has the sampler's other
messages. The request token is random, as the Request documentation
asks (https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Request.html).
The window is named for the portal on the UI thread, as for the save
dialog, and the sampler's thread keeps the window and its export until
the portal answers.
Window › Swatch Libraries › Gradients gains Organic Fades, a gradient
library of fifteen fades (ten linear, five radial). Each runs through
three to five unevenly spaced stops with off-center midpoints, mixes
with the Perceptual method, and thins out to transparent at the end of
a linear fade or at the edge of a radial one. The colors are computed
from VectorCraft's own OKLCH anchors.
The library also lists in the Swatches panel's library menu, in
swatch.library.list (category "gradients") and in the Gradient panel's
Presets. swatch.library.add keeps each fade's stops, opacities,
midpoints and method in RGB and CMYK documents.
The other built-in libraries are unchanged: their gradients still mix
with Classic and keep centered midpoints, and a test checks it.
- Gradient previews in the Swatch Libraries panel, the Gradient
panel's Presets menu, swatch tiles and the toolbar drew every stop
opaque. Each chip vertex now takes the sampled opacity as its alpha
(freeform points too), and a chip with any translucent vertex draws
a white and gray checkerboard under the gradient. Opaque gradients
draw as before.
- When the preferences are applied, a saved gradient preset whose name
matches a built-in preset, or an earlier saved preset, in any case,
is renamed to the first free "<name> N" (N from 2), so a saved
preset named like a new built-in fade stays listed and can be
applied and deleted.
In distance mode, each pixel took a square root for every background color.
The nearest color is now found by squared distance, and only that distance is
converted to a percentage. The levels do not change.
Affinity: read native documents with craft-affinity from craft-libs
* Affinity: read native documents with craft-affinity from craft-libs
crates/affinity's reader moved to craft-libs as craft-affinity (#914).
The crate keeps its name and re-exports it, so the engine, the corpus
tests and fuzz targets, and the Affinity corpus CI job are unchanged.
Its integration tests take craft-libs' versions; the one signature that
changes is patchy-shapes-2.af, whose special shapes now have outlines.
* Affinity: pin craft-affinity to craft-libs 228f6d0c (no change to the crate)
cached_frames_keep_their_scale_during_resize_rotation_and_dpi_changes
delivered the worker's frame with a 1 ms render time. The canvas key
carries the process-wide placed-document generation, so when another
test in the same run made a placed bitmap between the delivery and the
next frame, the key no longer matched. With a 1 ms last frame, the next
frame rendered on the UI thread over the delivered one, and the
"the worker's frame arrived" assertion failed.
The delivered frame now reports 50 ms, as the frames before it do, so a
moved generation queues the next frame on the controlled worker and the
delivered frame stays shown.
drop_left forgot a copy in an area the session left before removing it, so a copy whose removal failed (the area read-only for a moment) could later be offered back to the same session as a crash's copy. The entry now stays until both files are removed, and the next heartbeat tries again.
Convert to Artboards found the highest artboard id twice for each object it
converted: once for the new artboard's name and once in
Document::next_artboard_id. Converting N objects read about N^2 artboards.
The command now keeps the highest id as it adds artboards, and
Document::next_artboard_id_above gives the next id from it. When an artboard
has id u32::MAX, it falls back to next_artboard_id, which takes the smallest
free id. The ids and names it gives are unchanged.
The fuel and heap checks for a host evaluator's source were split into a third
before encoding and the rest after, so a source whose whole UTF-16 text did not
fit in the heap could still be encoded and parsed. The whole encoded size is now
reserved before encoding. A source over the source limit is still refused as a
syntax error.