bread-capture: rainbow-gradient isolation background instead of flat color
A solid background can't reveal whether a surface that's supposed to be translucent (breadbox/breadclip/breadsearch's full-screen overlay windows, breadbar's alpha-blended notification/OSD surfaces) is actually compositing as translucent — a flat color showing through a flat color still just looks flat. Generates a diagonal rainbow gradient (full hue sweep, via the `image` crate) sized exactly to the capture canvas and sets it as Sway's output background instead. Needed installing swaybg (the external helper Sway's `output ... bg` config directive shells out to) — without it the bg command silently no-ops and the canvas stays black, which is why the first attempt at this looked identical to the old flat-color version.
This commit is contained in:
parent
ff17a028a3
commit
e3df426996
3 changed files with 128 additions and 8 deletions
|
|
@ -16,3 +16,6 @@ path = "src/main.rs"
|
|||
bread-utils = { path = "../bread-utils" }
|
||||
clap = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
# Generates the isolated capture canvas's rainbow-gradient background — see
|
||||
# isolation.rs. png-only: no decoding, no other format support needed.
|
||||
image = { version = "0.25", default-features = false, features = ["png"] }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue