slint
slint copied to clipboard
Dark/Light mode detection on Linux with winit is unreliable
As a fan of the dark mode, the default bright mode is not very friendly to my eyes.
It would be useful to add a dark background
Edit: While the contrast issue is fixed, the issue that remains here is that with winit we don't get notified when the theme changes on Linux. See also https://github.com/rust-windowing/winit/issues/1549
Odd, for me the toolbar with the pick mode button and the combobox looks okay (macOS). But the area around the preview'ed UI is unconditionally white:
background: root.experimental ? Colors.pink : Colors.white ;
I guess that should be Palette.background instead? @FloVanGH : Or should it be another one of the alternate backgrounds?
@tronical yes it's right it should be Palette.background
I would love to use a checkerboard pattern or something that contrasts with both light and dark backgrounds. We would have tiled images for that.
I did not use any default background color as that is very likely used in the embedded UI as well, making it hard to see where the "outer" UI stops and the "inner" UI a user wants to design starts.
We just discussed this briefly. While for the preview it would make sense to use Palette.alternate-background, the real issue seems to be that on Linux with winit the detection of the theme doesn't work reliably. Strictly speaking, this regressed with commit a45421b425748d459f8916e730f37b64aed9dfbe .