Hand the drag ghost to the renderer through a file, so it draws
The bitmap under the cursor was a solid red rectangle. Slint's drag overlay uploads the image as a texture, draws it and drops the texture in one call; with the wgpu FemtoVG renderer the drop is immediate and the draw is deferred to the flush, so the frame binds femtovg's placeholder — which is red. An image with a cache key survives in the texture cache until after the flush, and only a path gives one. So the composite goes to the data directory's scratch as a PNG and comes back through load_from_path; one file per drag, removed when the drag ends. A workaround for Slint 1.17.1, written up as one beside the code.
This commit is contained in:
@@ -53,6 +53,10 @@ dr-face = { workspace = true, features = ["inference"] }
|
||||
# runtime file; the build stays C-free either way (docs/inference.md §3).
|
||||
dr-inference-engine = { workspace = true, features = ["native"] }
|
||||
dr-thumbs.workspace = true
|
||||
# For the drag ghost only: the composite under the cursor has to reach the
|
||||
# renderer through a file, and the fan of thumbnails needs alpha, which the
|
||||
# thumbnail store's JPEG cannot carry. See `collections_ui::drag_image_via_file`.
|
||||
png = "0.18"
|
||||
# The library module writes scan results straight into the catalog, so it
|
||||
# needs the same SQLite types dr-catalog exposes.
|
||||
rusqlite.workspace = true
|
||||
|
||||
Reference in New Issue
Block a user