ImageSource::size() read a raster file's header, so a cache file that was cut short or garbled after the header counted as showable, where the Slint version's decoded image was empty. A raster picture is now decoded to tell (the first frame, with the limits the Slint side uses) and an SVG must parse as XML with an svg root (roxmltree, already in the tree through the vector renderer); the answer is kept per file stamp, and per key and content hash for a downloaded picture, and decoding runs outside the lock. The size check of the pixel count no longer overflows on a header that claims u32::MAX. ImageSource::Rgba holds a Pixels value that can only be made with the right length, so the Slint conversion cannot hand clone_from_slice bytes that do not fit (it panics on that). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
43 lines
1.6 KiB
TOML
43 lines
1.6 KiB
TOML
[package]
|
|
name = "voelin-ui-vm"
|
|
version = "0.0.1-alpha"
|
|
description = "Toolkit-free view models of the desktop client: engine state turned into plain rows, shared by the Slint and GPUI front ends."
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
publish.workspace = true
|
|
|
|
[lib]
|
|
name = "voelin_ui_vm"
|
|
path = "src/lib.rs"
|
|
|
|
# No UI toolkit here (no slint, no gpui): `cargo tree -p voelin-ui-vm -e normal`
|
|
# must show neither. The front ends convert these types (docs/ui.md).
|
|
[dependencies]
|
|
chrono = { version = "0.4.45", default-features = false, features = ["clock"] }
|
|
# Whether a picture file decodes, and its size; PNG and JPEG are listed as
|
|
# the front end's toolkit used to bring them.
|
|
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "gif", "webp", "bmp", "ico"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
# JSON values of the settings and the gateway's configuration keys.
|
|
serde_json = "1"
|
|
# Whether an SVG document is XML with an svg root (the vector renderers read
|
|
# it with this parser too).
|
|
roxmltree = { version = "0.21", default-features = false, features = ["std"] }
|
|
# The Twemoji archive's blocks (raw deflate).
|
|
miniz_oxide = "0.8"
|
|
# Grapheme clusters for emoji in chat text.
|
|
unicode-segmentation = "1.13"
|
|
voelin-audio = { path = "../voelin-audio", default-features = false }
|
|
voelin-core = { path = "../voelin-core", default-features = false, features = ["media"] }
|
|
voelin-gateway-proto = { path = "../voelin-gateway-proto" }
|
|
voelin-model = { path = "../voelin-model" }
|
|
voelin-store = { path = "../voelin-store" }
|
|
|
|
[dev-dependencies]
|
|
png = "0.18"
|
|
|
|
[lints]
|
|
workspace = true
|