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

Placed dark-light behind a feature gate in eframe and egui_glow #1437

Merged
merged 5 commits into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
* `ClippedMesh` has been replaced with `ClippedPrimitive` ([#1351](https://github.com/emilk/egui/pull/1351)).
* Renamed `Frame::margin` to `Frame::inner_margin`.
* Renamed `AlphaImage` to `FontImage` to discourage any other use for it ([#1412](https://github.com/emilk/egui/pull/1412)).
* `dark-light` (dark mode detection) is now an opt-in feature for `eframe` and `egui_glow` ([#1437](https://github.com/emilk/egui/pull/1437)).

### Fixed 🐛
* Fixed ComboBoxes always being rendered left-aligned ([#1304](https://github.com/emilk/egui/pull/1304)).
Expand Down
2 changes: 2 additions & 0 deletions eframe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ screen_reader = [
"egui_web/screen_reader",
]

dark-light = [ "egui-winit/dark-light"] # detect dark mode system preference


[dependencies]
egui = { version = "0.17.0", path = "../egui", default-features = false }
Expand Down
3 changes: 2 additions & 1 deletion egui_glow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ screen_reader = ["egui-winit/screen_reader"]
# if you want to use glow painter on web disable this feature.
winit = ["egui-winit", "glutin"]

dark-light = ["egui-winit/dark-light"] # detect dark mode system preference


[dependencies]
egui = { version = "0.17.0", path = "../egui", default-features = false, features = [
Expand All @@ -67,7 +69,6 @@ tracing = "0.1"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
egui-winit = { version = "0.17.0", path = "../egui-winit", optional = true, default-features = false, features = [
"dark-light",
"epi_backend",
] }
glutin = { version = "0.28.0", optional = true }
Expand Down