mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-30 04:37:29 -06:00
The window's CAMetalLayer had no color space: wgpu 30.0.1 sets it to nil for an sRGB surface each time it configures the surface, and Core Animation does not color-match a layer without one. On a wide-gamut display #FF0000 showed as the display's own red, (255, 0, 0) in a capture where Preview shows the same sRGB red as (234, 51, 35). A paint callback that draws nothing runs after egui configures the surface and before the frame is presented. It sets sRGB on each window's Metal layer that has no color space and leaves any other color space as it is. wgpu's own fix (gfx-rs/wgpu#10286) is in no release yet. Fixes #3161.
113 lines
6.6 KiB
TOML
113 lines
6.6 KiB
TOML
[package]
|
|
name = "vectorcraft"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
default-run = "vectorcraft"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
default = ["wgpu", "accessibility"]
|
|
wgpu = ["eframe/wgpu", "dep:winsafe"]
|
|
accessibility = ["eframe/accesskit"]
|
|
|
|
[dependencies]
|
|
vectorcraft-engine = { workspace = true, features = ["bundled-fonts"] }
|
|
vectorcraft-ui-egui = { workspace = true }
|
|
vectorcraft-text = { workspace = true }
|
|
# Shared across the Craft suite: decides who draws the window frame per desktop (compositor vs app)
|
|
# so VectorCraft matches the rest on Linux. `egui` adds `craft_window::decorate`. See #217.
|
|
craft-window = { workspace = true }
|
|
eframe = { workspace = true, features = ["clipboard", "default_fonts", "wayland", "x11"] }
|
|
egui = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = { workspace = true }
|
|
chrono = { workspace = true }
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
rfd = { workspace = true }
|
|
# wayland-data-control: native Wayland clipboard (Linux; X11 through XWayland only sees what X11 apps copied).
|
|
arboard = { workspace = true, features = ["image-data", "wayland-data-control"] }
|
|
image = { workspace = true }
|
|
webbrowser = { workspace = true }
|
|
# The window's monitors, size and position (the same winit eframe runs on).
|
|
winit = { version = "0.30", default-features = false }
|
|
craft-print = { workspace = true }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
craft-update = { workspace = true }
|
|
clipboard-win = { workspace = true }
|
|
# Which GPU drives which display (EnumDisplayDevices, src/gpu.rs), so the window is drawn on the
|
|
# GPU that shows it: drawing on a GPU without a monitor reset the display driver. Safe wrappers over
|
|
# Win32 (MIT); the `user` feature is User32.dll only. Only the wgpu renderer chooses an adapter.
|
|
winsafe = { version = "0.0.29", default-features = false, features = ["user"], optional = true }
|
|
|
|
# DirectWrite's system font collection and GDI's font list (src/system_fonts.rs): fonts that font
|
|
# services such as Adobe Fonts load in place (#579, #1258). MIT OR Apache-2.0, already in the build
|
|
# through accesskit.
|
|
# Win32_UI_WindowsAndMessaging has `MSG` and `WM_POINTERDOWN`, which src/windows_stylus.rs uses to
|
|
# read a pen's barrel button from its pointer messages. Win32_UI_Input_Pointer has
|
|
# `GetPointerPenInfo`, which it uses to read the pen's pressure and which end of the pen is down.
|
|
windows = { version = "0.62", features = ["Win32_Graphics_DirectWrite", "Win32_Graphics_Gdi", "Win32_UI_Input_Pointer", "Win32_UI_WindowsAndMessaging"] }
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
# The macOS menu bar (src/mac_menu.rs): Tauri's menu crate, AppKit menus behind a safe API (no GTK
|
|
# with default features off). Pinned exactly: review the diff before bumping.
|
|
muda = { version = "=0.21.2", default-features = false }
|
|
objc2 = "0.6"
|
|
objc2-app-kit = { version = "0.3", default-features = false, features = ["std", "block2", "objc2-core-foundation", "objc2-quartz-core", "NSApplication", "NSButton", "NSColor", "NSColorSampler", "NSColorSpace", "NSControl", "NSMenu", "NSEvent", "NSPasteboard", "NSPopUpButton", "NSResponder", "NSSavePanel", "NSTextField", "NSTextInputContext", "NSView", "NSWindow"] }
|
|
# Files opened from Finder and the Dock (src/open_documents.rs), pasted bitmaps (src/clipboard.rs) and the control channel's App Nap activity (src/control_server.rs); both already come with winit, muda and rfd.
|
|
objc2-foundation = { version = "0.3", default-features = false, features = ["std", "block2", "NSArray", "NSData", "NSGeometry", "NSNotification", "NSOperation", "NSProcessInfo", "NSString", "NSURL"] }
|
|
block2 = "0.6"
|
|
# The window's AppKit view, to centre its buttons on the app bar (src/mac_window.rs). MIT OR
|
|
# Apache-2.0 OR Zlib, already in the build through eframe and winit.
|
|
raw-window-handle = "0.6"
|
|
# CoreText's font manager (src/mac_fonts.rs): fonts that apps and font managers register from their
|
|
# own folders (#579). Zlib OR Apache-2.0 OR MIT; objc2-core-foundation already comes with
|
|
# objc2-foundation.
|
|
objc2-core-foundation = { version = "0.3", default-features = false, features = ["std", "CFArray", "CFString", "CFURL"] }
|
|
objc2-core-text = { version = "0.3", default-features = false, features = ["std", "CTFontManager"] }
|
|
# The windows' Metal layers and the sRGB color space they are tagged with (src/mac_color_space.rs).
|
|
# Zlib OR Apache-2.0 OR MIT, already in the build through wgpu with these features.
|
|
objc2-quartz-core = { version = "0.3", default-features = false, features = ["std", "objc2-core-foundation", "objc2-core-graphics", "CALayer", "CAMetalLayer"] }
|
|
objc2-core-graphics = { version = "0.3", default-features = false, features = ["std", "CGColorSpace"] }
|
|
# Waits for the answer of a file dialog shown as a sheet (src/main.rs, #867). MIT OR Apache-2.0,
|
|
# already in the build through eframe.
|
|
pollster = "1"
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
# GNOME/Wayland needs client-side window controls without a bundled title font.
|
|
winit = { version = "0.30", default-features = false, features = ["wayland-csd-adwaita-notitle"] }
|
|
# A drawing tablet's pen pressure under X11 and XWayland (src/tablet.rs): XInput2 raw events on a
|
|
# second X connection, x11rb's pure-Rust `RustConnection`. MIT OR Apache-2.0, already in the build
|
|
# through winit with the `xinput` feature.
|
|
x11rb = { version = "0.13", default-features = false, features = ["xinput"] }
|
|
|
|
# Asks the Wayland compositor which GPU it draws with (linux-dmabuf feedback, src/compositor_gpu.rs),
|
|
# so Automatic draws on that one. Both are already in the build through winit.
|
|
wayland-client = "0.31"
|
|
wayland-protocols = { version = "0.32", features = ["client", "unstable"] }
|
|
# The save dialog's parent window on Wayland (src/portal_save.rs): an xdg-foreign handle (in
|
|
# wayland-protocols' `unstable` set) made on the window's own connection. MIT, already in the build
|
|
# through winit and rfd.
|
|
wayland-backend = { version = "0.3", features = ["client_system"] }
|
|
|
|
# The save dialog's file type (src/portal_save.rs, #2679): the desktop portal over D-Bus, on the
|
|
# systems where rfd shows the portal's dialog. MIT, already in the build through accesskit. Pinned
|
|
# exactly: review the diff before bumping.
|
|
[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd"))'.dependencies]
|
|
zbus = "=5.19.0"
|
|
|
|
[build-dependencies]
|
|
# Icon + VERSIONINFO for vectorcraft.exe; build.rs only uses it when targeting Windows.
|
|
winresource = "0.1"
|
|
|
|
[dev-dependencies]
|
|
# Bound socket buffers in real loopback transport deadline regressions.
|
|
socket2 = { workspace = true }
|
|
# src/portal_save.rs's tests build and read the portal's D-Bus values on every system.
|
|
zbus = "=5.19.0"
|