usebruno / bruno

Opensource IDE For Exploring and Testing Api's (lightweight alternative to postman/insomnia)
https://www.usebruno.com/
MIT License
22.47k stars 1.04k forks source link

Follow system theme option on linux (freedesktop color scheme) #2581

Closed TomiOhl closed 4 days ago

TomiOhl commented 3 weeks ago

I have checked the following:

Describe the bug

The follow system theme option doesn't work on Linux, Bruno stays always in light mode. Most Linux distros follow this preference: https://gitlab.gnome.org/GNOME/Initiatives/-/wikis/Dark-Style-Preference

.bru file to reproduce the bug

No response

Screenshots/Live demo link

System in light mode: image System in dark mode: image Bruno in dark mode: image

Its-treason commented 3 weeks ago

Interresting Bruno currently uses the Browser API to determine the correct theme. This works well on windows not sure why it does not on Linux.

But electron offer an API for this: https://www.electronjs.org/docs/latest/api/native-theme maybe it works better with that.

TomiOhl commented 3 weeks ago

System theme detection was fixed in Chromium 114 iirc, so it might be required to update electron version, too. Another example of an electron app recently fixing theme detection is VS Code.

TomiOhl commented 4 days ago

This got fixed with #2668, since electron got updated to v 25+, which has theme changing fixed 🎉