Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eframe: Figure out dark mode preference on native #1001

Closed
emilk opened this issue Dec 26, 2021 · 5 comments · Fixed by #1045
Closed

eframe: Figure out dark mode preference on native #1001

emilk opened this issue Dec 26, 2021 · 5 comments · Fixed by #1045
Labels
eframe Relates to epi and eframe feature New feature or request

Comments

@emilk
Copy link
Owner

emilk commented Dec 26, 2021

egui_web follows the user preference for light vs dark mode, and it would be nice if we could do the same when compiling natively (somewhere in egui-winit).

EDIT: as @parasyte points out, this should be fixed in winit: rust-windowing/winit#1549

@emilk emilk added feature New feature or request eframe Relates to epi and eframe labels Dec 26, 2021
@parasyte
Copy link
Contributor

parasyte commented Dec 30, 2021

This would be nice to have! AFAIK, winit only has support for probing the system theme on Windows, X11, Wayland, and web.

One of the relevant winit issues: rust-windowing/winit#1549

@BrainBlasted
Copy link

For Linux, you may want to look into the cross-desktop color-scheme key provided by xdg-desktop-portal: flatpak/xdg-desktop-portal#633

@LordMZTE
Copy link
Contributor

Wouldn't it be great, if eframe would actually not just figure out dark/light mode on linux, but actually used the GTK3 theme? If we're adding platform theme support, then that should be easy to do.

@Be-ing
Copy link

Be-ing commented Jan 5, 2022

There is a dark-light crate that does this.

For Linux, you may want to look into the cross-desktop color-scheme key provided by xdg-desktop-portal: flatpak/xdg-desktop-portal#633

That is being implemented in the dark-light crate: frewsxcv/rust-dark-light#4

@emilk
Copy link
Owner Author

emilk commented Jan 6, 2022

Oooh nice find @Be-ing! Let's start using it right away so we don't need to wait for winit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eframe Relates to epi and eframe feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants