mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-08 11:31:37 +00:00
Cmd/Ctrl+V dropped egui's PasteImage event, and the ribbon/menu Paste only read text, so screenshots and images copied in a browser reported "Nothing to paste". Both now encode the pixels as PNG (bounded to 16384 px per side, 64 Mpx) and run insert.picture as a floating picture anchored at the active cell, as Excel does. Text on the clipboard still wins. New host service: Services::paste_image (arboard). Fixes #699, #3018, #3182.
73 lines
3.1 KiB
TOML
73 lines
3.1 KiB
TOML
[package]
|
|
name = "gridcraft"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
default-run = "gridcraft"
|
|
description = "GridCraft desktop app"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
gridcraft-engine = { workspace = true }
|
|
gridcraft-ui-egui = { workspace = true }
|
|
eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "wayland", "x11", "clipboard"] }
|
|
egui = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = { workspace = true }
|
|
image = { workspace = true }
|
|
chrono = { workspace = true }
|
|
|
|
[build-dependencies]
|
|
# Icon + VERSIONINFO for gridcraft.exe; build.rs only uses it when the target is Windows.
|
|
winresource = "0.1"
|
|
|
|
[target.'cfg(all(unix, not(any(target_os = "macos", target_os = "linux"))))'.dependencies]
|
|
winit = { version = "0.30", default-features = false, features = ["x11"] }
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
# Retain X11 fallback; draw Wayland client-side controls without bundled title fonts.
|
|
winit = { version = "0.30", default-features = false, features = ["x11", "wayland-csd-adwaita-notitle"] }
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
# Same craft-libs revision as the workspace's craft-update and craft-window (see the root
|
|
# Cargo.toml).
|
|
craft-print = { git = "https://github.com/storytold/craft-libs", rev = "c5a1cbfb5f9049f9270955caffb5bee5997aebf7" }
|
|
craft-update = { workspace = true }
|
|
rfd = { workspace = true }
|
|
arboard = { workspace = true, features = ["image-data"] }
|
|
gridcraft-mcp = { workspace = true }
|
|
# The control channel's token (OS random numbers); already in the tree.
|
|
getrandom = "0.4"
|
|
|
|
[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
|
|
arboard = { workspace = true, features = ["image-data", "wayland-data-control"] }
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
# Blocks on the start-up DirectX 12 adapter probe (`graphics.rs`); already in the tree via eframe.
|
|
pollster = "1"
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
muda = { version = "0.21", default-features = false }
|
|
# Finder double-click, Open With, Dock drops and `open -a GridCraft file.xlsx` arrive as a
|
|
# kAEOpenDocuments Apple event, which winit 0.30 doesn't handle (#69). This audited crate (also used
|
|
# by PdfCraft and PhotoCraft) registers the handler (Objective-C interop needs unsafe, which our
|
|
# workspace forbids) behind a safe API. Pinned exactly: review the diff before bumping.
|
|
fmv-macos-events = "=0.1.0"
|
|
# apple_events.rs brings the app forward for a Dock quit's question. Already in Cargo.lock (muda,
|
|
# winit); pinned exactly to the same versions.
|
|
objc2 = "=0.6.5"
|
|
objc2-app-kit = { version = "=0.3.2", default-features = false, features = ["std", "NSApplication", "NSResponder", "NSWindow"] }
|
|
|
|
# tests/mac_menu_appkit.rs: reads AppKit's menu bar back. Already in Cargo.lock (muda, winit);
|
|
# pinned exactly to the same versions.
|
|
[target.'cfg(target_os = "macos")'.dev-dependencies]
|
|
objc2 = "=0.6.5"
|
|
objc2-app-kit = { version = "=0.3.2", default-features = false, features = ["std", "NSApplication", "NSMenu", "NSMenuItem", "NSResponder"] }
|
|
|
|
[[test]]
|
|
name = "mac_menu_appkit"
|
|
harness = false
|