mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-22 18:06:33 +11:00
On Web, remove Window::is_dark_mode()
(#2951)
This commit is contained in:
parent
44e2f95331
commit
5379d60e4d
3 changed files with 1 additions and 9 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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<HtmlCanvasElement>;
|
||||
|
||||
/// Whether the browser reports the preferred color scheme to be "dark".
|
||||
fn is_dark_mode(&self) -> bool;
|
||||
}
|
||||
|
||||
pub trait WindowBuilderExtWebSys {
|
||||
|
|
|
@ -55,12 +55,6 @@ impl WindowExtWebSys for Window {
|
|||
fn canvas(&self) -> Option<HtmlCanvasElement> {
|
||||
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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue