From a52bbade45dd954ab024de3325d0a691deeb6296 Mon Sep 17 00:00:00 2001 From: Collin Kemper <55854132+collin-kemper@users.noreply.github.com> Date: Fri, 1 Apr 2022 05:10:47 -0400 Subject: [PATCH] Place dark-light behind a feature gate in eframe and egui_glow (#1437) --- CHANGELOG.md | 1 + eframe/Cargo.toml | 2 ++ egui_glow/Cargo.toml | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4965ec97..6ded790d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)). diff --git a/eframe/Cargo.toml b/eframe/Cargo.toml index 5b2f4b40..f1a50935 100644 --- a/eframe/Cargo.toml +++ b/eframe/Cargo.toml @@ -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 } diff --git a/egui_glow/Cargo.toml b/egui_glow/Cargo.toml index 717d8d7b..3d62c53e 100644 --- a/egui_glow/Cargo.toml +++ b/egui_glow/Cargo.toml @@ -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 = [ @@ -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 }