diff --git a/CHANGELOG.md b/CHANGELOG.md index 2586d129..50d6c18e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ And please only add new entries to the top of this list, right below the `# Unre - On Web, fix some `Window` methods using incorrect HTML attributes instead of CSS properties. - On Web, fix some `WindowBuilder` methods doing nothing. - On Web, implement `Window::focus_window()`. +- On Web, remove unnecessary `Window::is_dark_mode()`, which was replaced with `Window::theme()`. # 0.29.0-beta.0 diff --git a/src/platform/web.rs b/src/platform/web.rs index b353be82..d1dd7967 100644 --- a/src/platform/web.rs +++ b/src/platform/web.rs @@ -38,9 +38,6 @@ use web_sys::HtmlCanvasElement; pub trait WindowExtWebSys { /// Only returns the canvas if called from inside the window. fn canvas(&self) -> Option; - - /// Whether the browser reports the preferred color scheme to be "dark". - fn is_dark_mode(&self) -> bool; } pub trait WindowBuilderExtWebSys { diff --git a/src/platform_impl/web/web_sys/mod.rs b/src/platform_impl/web/web_sys/mod.rs index 16720d76..06526975 100644 --- a/src/platform_impl/web/web_sys/mod.rs +++ b/src/platform_impl/web/web_sys/mod.rs @@ -55,12 +55,6 @@ impl WindowExtWebSys for Window { fn canvas(&self) -> Option { self.window.canvas() } - - fn is_dark_mode(&self) -> bool { - self.window - .inner - .queue(|inner| is_dark_mode(&inner.window).unwrap_or(false)) - } } pub fn scale_factor(window: &web_sys::Window) -> f64 {