mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 20:34:22 +00:00
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.