Skip to content

Commit a52bbad

Browse files
Place dark-light behind a feature gate in eframe and egui_glow (#1437)
1 parent 1d32670 commit a52bbad

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
1717
* `ClippedMesh` has been replaced with `ClippedPrimitive` ([#1351](https://github.com/emilk/egui/pull/1351)).
1818
* Renamed `Frame::margin` to `Frame::inner_margin`.
1919
* Renamed `AlphaImage` to `FontImage` to discourage any other use for it ([#1412](https://github.com/emilk/egui/pull/1412)).
20+
* `dark-light` (dark mode detection) is now an opt-in feature for `eframe` and `egui_glow` ([#1437](https://github.com/emilk/egui/pull/1437)).
2021

2122
### Fixed 🐛
2223
* Fixed ComboBoxes always being rendered left-aligned ([#1304](https://github.com/emilk/egui/pull/1304)).

eframe/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ screen_reader = [
4242
"egui_web/screen_reader",
4343
]
4444

45+
dark-light = [ "egui-winit/dark-light"] # detect dark mode system preference
46+
4547

4648
[dependencies]
4749
egui = { version = "0.17.0", path = "../egui", default-features = false }

egui_glow/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ screen_reader = ["egui-winit/screen_reader"]
5353
# if you want to use glow painter on web disable this feature.
5454
winit = ["egui-winit", "glutin"]
5555

56+
dark-light = ["egui-winit/dark-light"] # detect dark mode system preference
57+
5658

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

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

0 commit comments

Comments
 (0)