Open yuqiang-yuan opened 3 weeks ago
This appears to be Linux specific. Transparent images display as expected for me on MacOS.
Can confirm on Wayland as well, the checkerboard background of the image viewer is semi-transparent regardless of whether or not the theme has a transparent background.
The checkerboard drawing is also affecting alpha, I don't see a good reason why it should do that on any platform, so I think changing opacity
to 1.
should fix it?
The bigger question here IMHO is why it overrides/skips the alpha of the window background, which should be 1.0 in non-transparent themes. Blending a semi-transparent checkerboard on top of the window background does still make some sense (it tints the checkerboard), although I'd probably want the checkerboard to be configurable in terms of opacity and brightness/contrast either way.
I don't think it overrides the alpha of the window? I cannot reproduce it when setting background
to #xxxxxxff
. Unlike other platforms, on wayland background.appearance
is only used as an hint for the compositor if the background is transparent and doesn't disable transparency, which is probably the real bug (it can also cause broken visuals when it's set to opaque
and transparency is less than 1.0
because the compositor is allowed to assume that's impossible).
Also, it's a little odd that background
blends there's, but not on e.g. the status bar..
Hm, that's weird. That would imply that the builtin Ayu Dark theme I checked with does not specify an opaque background color - but it does.
Check for existing issues
Describe the bug / provide steps to reproduce it
When open a image with transparent background, e.g.
ico
orpng
, the editor window is transparent.Environment
Zed: v0.155.2 (Zed) OS: Linux X11 ubuntu 24.04 Memory: 31.2 GiB Architecture: x86_64 GPU: NVIDIA GeForce RTX 4060 Ti || NVIDIA || 535.183.01
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log