1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

eframe: Don't follow system theme by default (#1941)

I have gone back and forth on this a bit, but I think the arguments
AGAINST following the system theme are many:

* `dark-light` is a big dependency with problems on Linux.
* Many people prefer the dark mode and ask how to set it as the default
  (even though they are using light mode in their OS).
* A developer may be surprised when the app changes theme when
  they run it on another computer.

So, the path of least surprise is to make this an opt-in feature
with dark mode as the default mode.

On native, you add the `dark-light` feature to enable it.
On web, you set `WebOptions::follow_system_theme`.
This commit is contained in:
Emil Ernerfeldt
2022-08-20 11:11:07 +02:00
committed by GitHub
parent 40e440b2f7
commit f4cc1c5465
3 changed files with 8 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ all-features = true
[features]
default = ["dark-light", "default_fonts", "glow"]
default = ["default_fonts", "glow"]
## Detect dark mode system preference using [`dark-light`](https://docs.rs/dark-light).
##