craft-libs main now holds craft-geom, craft-pathops and craft-trace
(storytold/craft-libs#2260, RFC-0030 step 1). The pin moves first, as its
own change, so the cutover that deletes VectorCraft's copies only swaps
crates.
API changes since f9e5cecc, behaviour kept:
- craft-dxf's Drawing has block definitions; VectorCraft writes none.
- craft-cdr reads text as Object::Text and counts what a CMX read left out;
CDR text stays left out under the existing unsupported-objects warning,
as it was when the reader dropped it.
Printer Setup started system-config-printer, xdg-open or open and dropped the
child, so the ended process stayed a zombie until the app quit. It now starts
them through host_services::spawn_detached, which waits for the process on a
thread. On Windows nothing changes.
Builds on #11007, which adds spawn_detached.
open_link, Show in Folder, opening a written file and Edit Original
dropped the spawned child without waiting for it, so on Linux and the
BSDs each finished xdg-open or editor process stayed a zombie until the
app exited. spawn_detached now starts a thread that waits for the
process before it starts it, so the process is reaped when it ends. On
Windows dropping the child closes its handle, so no thread is started.
DesktopWindows now passes the pointer, button, text and warp calls to
windows_stylus::ContactWindows, so a pen or a finger in contact still
counts as the primary button with the monitor listing in place.
The main window's UI runtime now gets a link opener (InstallSpec::open_links,
craft-libs #5083), which takes every http, https and mailto link the app asks
to open (Help menu, app bar Discord button, Home and About links, credits, the
updater, an object's URL) and starts the system handler once per request.
eframe's `links` feature, which opened them before, is removed.
The runtime's opener drops every other scheme, including the file: URLs of
View PDF after Saving and Show in Browser in Save for Web and SVG Options. The
app now hands those to a new desktop service, Services::open_file_url, which
opens them in the default web browser with the webbrowser crate, as eframe's
`links` feature did. Without the service (the web build) they go to egui as
before.
On Linux and the BSDs the link opener runs xdg-open with the URL as its only
argument. craft-libs' open_external runs `xdg-open -- <url>`, and xdg-open
(xdg-utils 1.1.3, Ubuntu 24.04) exits with "unexpected option '--'" without
opening anything. A URL that starts with "-" is refused. macOS and Windows use
open_external.
The framework finds the monitor a palette window is on by testing the
window's top-left corner, in the window's own points, at each listed
monitor's scale. With a scale-1 primary listed before a scale-2
secondary, a palette on the secondary matched the primary, and its
popups were kept in the primary's work area, away from their opener.
The desktop window system now lists monitors only when they all share
one scale. On a desktop with mixed scales, popups stay within the span
of the app's windows and dialogs reopen where they were saved, as
before this branch.
The desktop app passed the framework a window system that lists no
monitors, so a dialog such as Preferences reopened at its saved desktop
position without being fitted to any display, and palette popups had no
monitor to stay inside.
The app's window system now lists the monitors through winit, with each
monitor's work area on Windows (GetMonitorInfo), so a saved dialog that
no connected monitor shows comes back onto one with its title bar
reachable, and popups stay above the taskbar. A listing is reused for one
second and kept when winit stops on a display that went away while it
was listed. macOS lists no monitors, as before: winit gives each
display's position in that display's own scale, so displays with
different scales overlap. The main window's restore uses the same
listing.
Fixes#10230
Co-authored-by: FredApps <[email protected]>
Every craft-libs rev moves on to craft-libs main at f9e5cecc9c, which also
holds storytold/craft-libs#4039 and #5541. The egui, winit and acadrust
revs stay as craft-libs pins them.
A pen that reports pressure can report 0 while its tip is in contact, as
the tip touches down and lifts. pen_sample read that 0 as "no pressure"
and gave the sample full pressure, so a pressure-sized Blob Brush stroke
began with a half circle and ended with a full circle at the brush's
largest size. A pen with the pressure mask now keeps its 0; a pen in
contact that reports no pressure still presses fully, and a hovering
pen still reads 0.
Carries the windows_stylus.rs part of #10249.
Co-authored-by: FredApps <[email protected]>
Every craft-libs rev moves on to craft-libs main at d32100f6d2, which also
holds storytold/craft-libs#5222 and #5569. The skrifa patch stays at
37d0532f42, whose vendored skrifa is the same as main's. The egui, winit
and acadrust revs stay as craft-libs pins them.
When the thread's sent-message hook failed to install, the message hook
still noted the pointer in contact. Its WM_POINTERLEAVE and
WM_POINTERCAPTURECHANGED are sent, so they never reached the contact
list, and ContactWindows kept the primary button held until a mouse
message from a mouse cleared it.
follow_contact now adds a pointer only when the hook is installed. When
the install fails, the contact is not noted, and the pointer's next
in-contact message tries the install again.
Every craft-libs rev moves on to craft-libs main at a7fb3c3cd8, which also
holds storytold/craft-libs#5548. The egui, winit and acadrust revs stay as
craft-libs pins them.
Every craft-libs rev moves on to craft-libs main at 643892adc7, which also
holds storytold/craft-libs#3665, #3710, #4928, #5471 and #5554. The egui,
winit and acadrust revs stay as craft-libs pins them.
With craft-libs#4928 the Bezier overlay paints its anchors and handles as
one kept mesh. The test that compares the canvas anchor marks with the
overlay now tessellates the marks' run of shapes the same way before it
compares them, and leaves out placeholder shapes that paint nothing.
Since the move to the craft font catalog, the global catalog asked the
platform's font service (DirectWrite on Windows, CoreText on macOS) and
also ran the app's platform lister, which lists the same fonts again.
On Windows the font service opens and maps every installed face, so the
background font scan did that work twice at every start.
set_platform_font_files_complete sets a lister that lists every font
the font service lists. The catalog then reads the lister's files and
does not ask the font service. set_platform_font_files keeps adding to
the font service as before. The desktop app and vectorcraft-cli install
their Windows and macOS listers with the new call; both listers already
read DirectWrite's system collection (plus GDI's fonts) and CoreText's
available fonts.
With Windows Ink, winit reports a pen in contact as a touch, and egui
turns it into the primary press. Since the craft-libs pin took
d3a4e1592, the window host reads the mouse buttons with
GetAsyncKeyState to find a release the window never received. A pen
or a finger in contact is not a mouse button there, so the host
released the press on the stroke's first move: a Pencil stroke drawn
with a tablet pen left a mark a few pixels long.
The message hook now notes each pointer in contact, from its
WM_POINTERDOWN to its up, cancel, leave or capture change, and the
app's window services report the primary button down while one is.
A mouse message from a mouse ends every contact, so a contact whose
end went to another window does not keep the primary button held.
The thread's sent-message hook is installed when a pointer goes into
contact, so the leave and capture change reach it without a Wintab
context.
craft-libs#5596 fixes the same check in the window host. When the pin
takes it, ContactWindows can go back to SystemWindows.
Every craft-libs rev moves from 4f3e34d0dd, the head of craft-libs#5489, to craft-libs main.
The egui and winit revs are the ones that craft-libs rev pins, unchanged.
- Opacity fields (Control bar, Color Wheel, Gradient) show the stored fraction times 100 again.
craft-libs#5466 makes the number field step on from a value such as 50.999999 %, so
panels::shown_percent is removed.
- The Blend Options Ramp and Shift sliders, the Image Trace rows and the Divider field use
SliderField::edit_target (craft-libs#5024) in place of the id-salt workarounds. A value typed
for one object and not yet committed is still dropped when another is selected.
- CDR import: craft-libs now reads bitmaps as their own object kind. They are not placed; the
warnings name them with the other objects not read, and a PowerClip frame that clips only a
bitmap is named as a frame that opened empty.
When a late files read finds no copied files and the Copy made here was
a bitmap, Paste read the bitmap to compare it with the Copy before it
read the text. A bitmap read that gets no answer leaves the clipboard
worker busy, so the text read then failed at once and Paste took the
internal Copy instead of the text another app put there. The text is
now read first and kept for the paste.
When a late text read answers and the Copy made here was a bitmap, Paste
read the bitmap to compare before it read copied files. A bitmap read that
got no answer left the worker busy, so the files' read failed at once and
an art-file list on the clipboard was not pasted. Paste now reads copied
files first whenever the ownership check needs a read of its own, since a
Copy made here writes no files.
The doc comment on Ours now states that a bitmap is known by its size, as
Clipboard::owns already compares it, and the test covers a same-size bitmap
from another app.
On Linux and the BSDs, Copy reads the clipboard's text before it writes.
When the app that held the clipboard does not answer that read within its
wait, the read stays open, and the next Paste waits for its answer. Once it
came, Paste read the clipboard again as text only and compared that with
the Copy. A Copy whose SVG markup does not go out as text (art with more
than 1 MiB of placed images) puts only a bitmap on the clipboard, so the
text never matched, and Paste took that bitmap: one picture at 72 ppi in
place of the copied objects, in the same document or another one.
Paste now reads the clipboard as the Copy wrote it (text or bitmap) before
it compares, whatever the late read was, and takes the internal clipboard
when it matches.
CI's test-lint step rejected the 500 % case of
the_frame_limit_grows_with_the_monitor_dpi, which compared the clamped
rect with a tuple of numbers. The test now checks that only the bottom
edge moves and that it hangs below the work area by the same border the
top edge hangs above the monitor.
Hovering a style row of an expanded family in the font list previewed
only the family on the selected type. apply_preview now takes the style
the picker reports with its preview (FontPickerOutput::preview_style and
CharacterControlsOutput::preview_style) and passes it to the font
command, so the type shows the hovered style; a family row still
previews the family in the closest style it has.
Every craft-libs rev moves to storytold/craft-libs#5489's head
(4f3e34d0dd), which adds preview_style, gives style rows a sample in
their own face, and keeps a typed query when a family's disclosure, its
star or a filter is clicked. Cargo.lock changes only the craft-libs
source lines.
With monitors stacked vertically, the upper monitor's auto-hidden bottom
taskbar is parked mostly past its edge, so most of it lies on the monitor
below. The guard counted it as that monitor's top taskbar and trimmed a
maximize there a pixel short of the top. A taskbar that is not wholly on
a monitor now counts only when most of it is off that monitor, as an
auto-hidden taskbar of its own is.
The largest frame a parked maximize may have was a fixed 32 px. The
resize border grows with DPI (about 40 px at 500 %), so at high scaling a
maximize covering the taskbar was never moved clear of it. The limit is
now 32 px at 96 DPI, scaled by the window's DPI.
Part of #10797.
On the OpenGL backend, Preferences and floating panels drew their content
offset down and right by a title bar and border, while clicks landed at the
unshifted positions. These windows draw their own title bar, so winit makes
them undecorated, but it still gives them the WS_CAPTION and WS_BORDER styles,
and on these systems the frame stays reserved for the window surface. The
guard added for #1758 removes the two styles from the main window only.
A viewport hook now records every undecorated window other than the main
one as eframe creates it, and runs the same guard on it at creation and
before each of its frames, so the styles stay off when winit puts them back.
Windows with the system title bar are left alone, and a window's record is
dropped with the window.
The Swatches panel's body in craft-libs drops selected keys that no
longer name a swatch or a group on every repaint while the panel is
hovered, and checked each key with a scan of every swatch name. With
2,000 swatches in 20 groups and every swatch and group selected, one
run compared about two million names.
Every craft-libs rev moves from 4c330f6bd1 to dbc6b20e78, which reads
the swatch names once per run and stops when it has found every
selected name. Delete events and the footer's Delete answer the first
lookup of a swatch or a group name with a scan and later lookups of
that kind from a map of the names. Cargo.lock changes only the
craft-libs source lines.
Moves every craft-libs crate to craft-libs main 4c330f6, which contains
both 69c746e9 and main's c2a47df pin. The egui (399fc6e) and winit
(3fd7ae6) revs stay as that craft-libs rev uses them, and skrifa stays at
craft-libs 37d0532f until craft-libs#5222 merges.
Web builds and FreeBSD on 64-bit ARM have no DWG decoder, yet File ›
Open, File › Place, their "All readable files" and "All placeable
files" filters, `openExtensions`, `document.formats`, the MCP open_file
description and the CLI help all offered `.dwg` there, and a DWG file
then failed in the missing decoder.
- `vectorcraft_cad::dwg::DECODES` says whether the build decodes DWG.
- `readable_format`, `open_exts()`, `place_exts()` and the per-format
dialog filters leave DWG out where it is false; `document.formats`
reports `dwg` as not readable there.
- An installed `.dwg` importer plug-in is used for such files on those
builds, by File › Open, File › Place and folder batches, and the
desktop app skips its background DWG conversion there.
- Without an importer, File › Place keeps the DWG-specific error, and a
`.dwg` file is still not read as HP-GL.
The listing functions take the decoder availability as a parameter, so
the new test checks both cases on every platform.
Paste on Windows never read the enhanced metafile that CAD and office
apps put on the clipboard as vector art: windows_formats had no entry for
EMF, so the app pasted their bitmap instead, or nothing. The Windows
clipboard holds an EMF as a handle (CF_ENHMETAFILE, which Windows also
makes from CF_METAFILEPICT), so the app now copies its records with
GetEnhMetaFileBits, at most 64 MiB, and pastes them through
clipboard.importEmf.
A .dxf, .dwg or HP-GL plot file copied in a file manager did not paste,
because file_flavour had no flavour for them, though Open and Place read
all three. They now paste as image/vnd.dxf, image/vnd.dwg and
application/vnd.hp-hpgl through the new command clipboard.importCad
{dataBase64, format: dxf|dwg|hpgl, center?}, read as document.open reads
the file. A file pastes this way only when its bytes are the format, so
a chart script named .plt is not taken for a plot.
Fixes#10819.
Every craft-libs dependency moves from 33966c68 to craft-libs main at
69c746e9, which adds the equal-spacing smart guides of a move
(ToolContext::add_measures and ToolHostResponse::measures). The egui and
winit forks stay at the revisions craft-libs pins (399fc6e0, 3fd7ae64).
Cargo.lock changes only the sources of the craft-libs packages.