Commit Graph
474 Commits
Author SHA1 Message Date
dotCooCoo 58e510f06c Fix #5451: Windows Save As follows selected file type 2026-11-17 21:18:56 -08:00
BFlat 3d7acda832 Merge pull request #7134 from dotCooCoo/feat/web-korean-devanagari-fonts
Web: Korean and Hindi interface text draws with real glyphs
2026-11-18 10:30:59 +07:00
BFlat 12ab63aedd Merge pull request #7137 from dotCooCoo/feat/script-file-folder-write
Scripts: File and Folder objects write files inside a script's scope, with per-script grants and pickers
2026-11-18 10:25:30 +07:00
BFlat cb76b41e96 Merge pull request #8086 from dotCooCoo/feat/low-latency-drawing
Performance: Low-Latency Drawing preference presents without vsync, capped at 240 fps
2026-11-18 10:15:17 +07:00
dotCooCoo 61abac22bf Merge main into chore/craft-libs-exr-deep-offsets
# Conflicts:
#	Cargo.toml
2026-11-17 07:20:10 -08:00
BFlat c4147826a3 Merge pull request #7353 from dotCooCoo/fix/i18n-adjacent-placeholders
i18n: messages with values side by side can be translated
2026-11-17 21:32:55 +07:00
Taha-Mahmoodi 92a2d2de71 Fix clippy on macOS with current stable: dead_code on Overrides::is_set, needless_range_loop in cut_edge
Overrides::is_set is only called from main under cfg(not(macos)), so it is allowed to be unused there (the repo's cfg_attr pattern). settle_cut_edges walks blended with iter_mut().enumerate() instead of indexing it.
2026-11-17 16:48:13 +04:30
dotCooCoo d39471962e Merge main into feat/script-file-folder-write 2026-11-16 20:51:55 -08:00
dotCooCoo fc1ed0acb6 Merge main into chore/craft-libs-exr-deep-offsets 2026-11-16 19:51:24 -08:00
dotCooCoo 07afd411bb Dependencies: take every craft-libs crate from craft-libs main at 64b181977a
Every storytold/craft-libs git dependency, the hayro, krilla and
linesweeper patches and the web app's craft-web-api now use one
revision, 64b181977a, so Cargo.lock holds one copy of each craft-libs
crate. craft-ui's docking Monitor has a new work_area field; the
monitors VectorCraft lists set it to None, as winit reports no work
area.
2026-11-16 18:57:11 -08:00
dotCooCoo 39d776aa2b Merge main into feat/web-korean-devanagari-fonts 2026-11-16 09:54:01 -08:00
dotCooCoo 3edb844683 Performance: Low-Latency Drawing preference presents without vsync, capped at 240 fps
Preferences › Performance › Low-Latency Drawing (lowLatencyDrawing, off by
default) is read when the app starts and asks for wgpu's AutoNoVsync. The
present mode comes from --present-mode, then VECTORCRAFT_PRESENT_MODE, then
the preference, then the default; with the preference off and no override
the window surface is unchanged. The startup log names "(preference)" or
"(override)" after the mode.

Whenever the window presents without vsync, from the preference or an
override, main-window frames start at most 240 times a second (about
4.17 ms apart). The wait comes before egui reads the frame's input, and
the frame's time moves on by it. With vsync the display paces the frames
and no cap applies.

The checkbox shows on the desktop with the note that it applies the next
time VectorCraft starts. A value that is not a boolean is an error.

Fixes #6013
2026-11-16 00:35:22 -08:00
dotCooCoo fe9cfa875c Color: Sample Color from Screen picks where the button was released
The Windows sampler read the pointer with GetCursorPos when it handled
WM_LBUTTONUP, so a pointer that moved after the release picked a
different pixel. It now takes the point from the release message's
lParam, a signed client point, and converts it to screen coordinates.
lParam holds each coordinate in 16 bits, so on a virtual screen wider
or taller than 32,767 pixels the high bits come from the message's own
pointer position (MSG.pt).
2026-11-16 00:18:50 -08:00
dotCooCoo 388044db13 Color: Sample Color from Screen works on Windows
Windows had no screen color sampler, so the Color Picker's eyedropper
button was gray and ui.sampleScreenColor returned an error there.

The new sampler copies the virtual screen (every monitor, including
ones at negative coordinates and at other display scales) and covers it
with a borderless topmost window that shows the copy under a crosshair.
A left click picks the copied pixel, read as sRGB. Escape, a click of
another mouse button, Alt+F4 or switching to another window cancels.
The window runs on its own thread, so the app keeps drawing, and the
copy's size is checked before it is allocated.

Docs: docs/mcp.md, docs/control-protocol.md, docs/target-app-parity.md
and the ui.sampleScreenColor params text.
2026-11-15 23:15:43 -08:00
dotCooCoo 3c73995861 Merge main into feat/script-file-folder-write 2026-11-15 16:06:24 -08:00
dotCooCoo bcab943669 Merge main into fix/i18n-adjacent-placeholders 2026-11-15 16:06:09 -08:00
BFlat bf7fefd89e Merge pull request #7954 from dotCooCoo/feat/file-info-templates
File Info: the menu saves, imports and lists metadata templates
2026-11-16 06:55:33 +07:00
BFlat e3f8d8abc6 Merge pull request #7961 from dotCooCoo/fix/clipboard-file-lists-formats
Clipboard: paste checks the size of another app's data before copying it
2026-11-16 06:54:09 +07:00
BFlat 5ecb2cda86 Merge pull request #7926 from dotCooCoo/feat/present-mode-overrides
Graphics: --present-mode and --frame-latency set how the window presents frames
2026-11-16 04:30:17 +07:00
dotCooCoo f66aa65083 Clipboard: Windows text is bounded before it is converted, and each bitmap format has its own limit
The size of a CF_UNICODETEXT block is checked against the most UTF-8 it
could come to (3 bytes a code unit), so the converted text is never
larger than the limit. CF_DIBV5 and CF_DIB are each copied when they
fit the limit, so a large first format that doesn't decode still
leaves the second to paste.
2026-11-15 12:06:56 -08:00
dotCooCoo 04b3123120 Clipboard: paste checks the size of another app's data before copying it
Paste takes at most 64 MiB of a format another app copied, VectorCraft's
existing limit for copied files, and reads the size before the copy:

- On Windows, each registered format, the CF_DIBV5 and CF_DIB bitmaps
  (together), CF_UNICODETEXT and the CF_HDROP file list. A larger format
  is skipped and the next one is tried.
- On macOS, each pasteboard type's data length is checked before it is
  copied.
- A copied file list of more than 1,024 files pastes no file, and no
  file in it is opened, on every platform, as the Linux text/uri-list
  reader already does. On Windows the CF_HDROP names are counted before
  they are read.
2026-11-15 11:41:45 -08:00
dotCooCoo a670cd1102 File Info: metadata templates save, import and list from the File Info menu
File Info's menu saves the fields as an XMP metadata template (into the
Metadata Templates folder next to the preferences, or any file), imports
one with a choice of three merges, lists the saved templates and opens
the folder. The import is one undo step and records nothing when no
field changes.

- file.info.saveTemplate writes the title (when it is not the
  document's name), author, author title, description, keywords,
  rating, copyright status, notice and URL that have a value.
- file.info.applyTemplate reads a file, a saved template or XMP text
  (at most 8 MB) and merges it: replace clears the fields first, keep
  takes each field the template has, append adds keywords and fills
  only empty fields. apply: false returns the merged fields without
  changing the document.
- file.info.templates lists the folder's .xmp files.
- A PDF or .ai also opens with the rating and author title its XMP
  packet gives.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-15 11:05:55 -08:00
dotCooCoo b0514228b0 Clipboard: Edit > Paste is enabled when the clipboard holds only copied files
On X11 and the Wayland data-control clipboard (through arboard), the
Paste menu check read only the clipboard's text, so a file manager copy
with no text left Edit > Paste disabled while the paste keys pasted the
first copied file that is art. After a text miss, the check now reads
the copied file list when the paste can take files, without opening a
file. Copied files already enabled Paste through the core Wayland check
and the Windows check. A paste of text alone does not read the list.
2026-11-15 10:56:12 -08:00
dotCooCoo 2238a00e43 Graphics: --present-mode and --frame-latency set how the window presents frames
--present-mode (fifo, autovsync or novsync) and --frame-latency (1 to 3),
or VECTORCRAFT_PRESENT_MODE and VECTORCRAFT_FRAME_LATENCY, change the
window surface for one launch. A flag overrides its variable, and a value
outside these stops the app with a message. The log records the surface
the app requests at startup. On Windows and Linux, a launch that sets
either one opens its files in a new window, as --new-instance does.
Without them the window keeps autovsync with one frame queued.
2026-11-15 10:54:08 -08:00
dotCooCoo 0a2d7e623c Merge main into feat/script-file-folder-write 2026-11-14 13:43:11 -08:00
dotCooCoo 9c650ec9bb Merge main into fix/i18n-adjacent-placeholders 2026-11-14 12:31:21 -08:00
dotCooCoo dba7b06fbc Merge main into feat/web-korean-devanagari-fonts 2026-11-14 12:28:45 -08:00
dotCooCoo 6fb111cfff Merge main into feat/web-korean-devanagari-fonts 2026-11-14 09:52:23 -08:00
dotCooCoo 7985952ac5 Merge main into fix/i18n-adjacent-placeholders 2026-11-14 07:25:54 -08:00
dotCooCoo 32e90d5e2c Merge main into fix/paste-copied-file-size-limit 2026-11-14 07:18:49 -08:00
dotCooCoo d7070a6297 Merge main into feat/script-file-folder-write 2026-11-14 07:11:41 -08:00
BFlat 564eee35d4 Merge pull request #7445 from dotCooCoo/fix/web-locks-monotonic-clock
Web: Data Recovery's lock snapshots use the monotonic clock
2026-11-14 21:50:49 +07:00
dotCooCoo c7e5be068f Merge main into feat/web-korean-devanagari-fonts 2026-11-14 05:56:51 -08:00
dotCooCoo e464b612cf Paste: a copied file over 64 MiB is skipped before it is read
Paste read a file copied in a file manager whole with std::fs::read,
with no size limit. It now checks the opened file's size against
MAX_BYTES (64 MiB, the limit the Wayland clipboard reads already use,
now shared) before reading its first bytes, and reads the rest with a
bounded reader, so a file that grows after the check is read to at
most one byte past the limit and skipped. A skipped file lets the next
copied file that is art paste, as an unreadable one does.
2026-11-14 05:38:36 -08:00
dotCooCoo 8a4815de69 Merge main into fix/i18n-adjacent-placeholders 2026-11-14 05:22:27 -08:00
dotCooCoo 779591f5ca Merge main into fix/wayland-paste-copied-files 2026-11-14 04:46:48 -08:00
BFlat c1d153c051 Merge pull request #7485 from dotCooCoo/fix/quit-hides-all-windows-wayland
Clipboard: quitting on Linux takes every window off screen before the clipboard wait
2026-11-14 19:38:10 +07:00
dotCooCoo f3e097b813 Merge main into fix/web-locks-monotonic-clock 2026-11-14 02:36:36 -08:00
dotCooCoo 9735e51473 Clipboard: files copied in a file manager paste as art on core Wayland
Where the clipboard goes through the compositor's core Wayland protocol
(the Flatpak on GNOME), Paste now reads the text/uri-list a file manager
offers, else GNOME Files' x-special/gnome-copied-files, and pastes the
first file that is art before the clipboard's other types, as on the
other platforms. The list is read on the read worker and the files on
the paste's background thread. Only file: URIs with no host or
localhost are taken (RFC 8089), percent escapes decoded once (RFC
3986); other URIs are skipped, and a list of more than 1,024 URIs, a
limit of VectorCraft's own, names no file. The Paste menu item is
enabled when a file list is offered.
2026-11-14 02:24:26 -08:00
dotCooCoo d621a077da Merge main into feat/script-file-folder-write 2026-11-14 02:16:44 -08:00
dotCooCoo 513f9cf4a4 Merge main into feat/web-korean-devanagari-fonts 2026-11-14 02:16:26 -08:00
dotCooCoo 2a29c043f1 Merge main into fix/i18n-adjacent-placeholders 2026-11-14 02:00:12 -08:00
BFlat 3382abdd05 Merge pull request #7484 from dotCooCoo/fix/wayland-clipboard-stuck-pipe
Clipboard: a Wayland read or send ends when the other app moves no data for 2 s
2026-11-14 16:50:11 +07:00
dotCooCoo f46a745f57 Merge main into fix/web-locks-monotonic-clock 2026-11-13 23:02:20 -08:00
BFlat 27f8cf90f5 Merge pull request #7351 from dotCooCoo/fix/titlebar-pref-note
Preferences: System Title Bar says when the desktop keeps the title bar either way
2026-11-14 13:43:36 +07:00
dotCooCoo 82842e4fe0 Clipboard: a Wayland read or send ends when the other app moves no data for 2 s
On the core Wayland clipboard, a read waited for the app that copied to
close its pipe, and a send wrote until the app that pastes took all of
the data. An app that left its pipe open and stopped held the one read
worker, so later pastes failed at once, or held one of the eight send
threads until it closed its end.

Reads and sends now use the pipe nonblocking and wait for it with poll.
When no byte moves for 2 s (VectorCraft's own limit, the existing text
wait) the read fails without pasting partial data and the send stops;
both close their pipe. The wait starts again after each byte that moves,
so a large transfer that keeps going is not cut short.
2026-11-13 22:09:17 -08:00
dotCooCoo 6c26233a63 Clipboard: quitting on Linux takes every window off screen before the clipboard wait
Quitting can wait up to 27 s for the clipboard handles to let go before
eframe closes the windows. winit cannot hide a native Wayland window, so
the main window stayed on screen for that wait, and the X11 windows of
floating panels and documents were not hidden at all.

- A native Wayland main window is unmapped by attaching no buffer to its
  surface. The window and its connection stay open for the Wayland
  clipboard. An X11 main window, XWayland included, is hidden as before.
- On Linux the X11 windows of floating panels and documents are recorded
  as eframe creates and drops them (viewport hooks), and quitting unmaps
  them through a second X11 connection before the wait.
- The new module apps/vectorcraft/src/quit_windows.rs replaces
  app::hide_before_teardown, with tests of which windows are hidden or
  unmapped. portal_save's Wayland surface helper is shared with it.
2026-11-13 22:02:56 -08:00
dotCooCoo 729dc32b6f Printing: the spooler's note follows the printer name as its own sentence
The status after a print job read "Sent “{title}” to {to} ({note})".
With no note and a printer name that ends in parentheses, such as
"HP LaserJet (Copy 1)", the catalog matched that row and took the
parenthesized part of the name as the note, so a translation that puts
the verb after the printer split the name. The note now follows as its
own sentence: "Sent “{title}” to {to}. The spooler replied: {note}".
The status without a note is unchanged. All 27 catalogs translate the
new message, and a test checks that German keeps such a printer name
whole.
2026-11-13 21:38:29 -08:00
dotCooCoo c08d42fd58 Web: Data Recovery's lock snapshots use the monotonic clock
The browser build stamped each snapshot of the Web Locks held with
Date.now() and judged its age against Date.now(). After the system
clock was set back, an old snapshot read as fresh, so a tab could
report no lock on an area another tab still held. Snapshots are now
stamped and aged with vectorcraft_ui_egui::now_ms(), and a snapshot
stamped later than now is not trusted.
2026-11-13 20:57:53 -08:00
dotCooCoo e8f7f1b7b4 Merge main into fix/i18n-adjacent-placeholders 2026-11-13 19:11:07 -08:00