-
Notifications
You must be signed in to change notification settings - Fork 1.2k
System Theme vs Window Theme #3837
Copy link
Copy link
Closed
Labels
DS - appkitAffects the AppKit/macOS backendAffects the AppKit/macOS backendDS - webAffects the Web backend (WebAssembly/WASM)Affects the Web backend (WebAssembly/WASM)DS - win32Affects the Win32/Windows backendAffects the Win32/Windows backendS - apiDesign and usabilityDesign and usabilityS - platform parityUnintended platform differencesUnintended platform differences
Description
In #3736 the meaning of Window::theme() was changed to not return the system theme, ergo returning None without a theme override through Window::set_theme().
This is how currently MacOS works, but not how Web and Windows do.
I propose the following change:
- The meaning of
Window::theme()should be changed to return the current window theme, if no override is in place it returns the system theme. I think a use-case for only returning an override has yet to be observed. - MacOS should return the system theme in
Window::theme()if no theme override is in place. - A new
ActiveEventLoop::system_theme()method should be introduced that returns the system theme. - (optional) A new
Window::system_theme()convenience method should be added that returns the same asActiveEventLoop::system_theme().
Cc @madsmtm.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DS - appkitAffects the AppKit/macOS backendAffects the AppKit/macOS backendDS - webAffects the Web backend (WebAssembly/WASM)Affects the Web backend (WebAssembly/WASM)DS - win32Affects the Win32/Windows backendAffects the Win32/Windows backendS - apiDesign and usabilityDesign and usabilityS - platform parityUnintended platform differencesUnintended platform differences