Skip to content

System Theme vs Window Theme #3837

@daxpedda

Description

@daxpedda

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 as ActiveEventLoop::system_theme().

Cc @madsmtm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DS - appkitAffects the AppKit/macOS backendDS - webAffects the Web backend (WebAssembly/WASM)DS - win32Affects the Win32/Windows backendS - apiDesign and usabilityS - platform parityUnintended platform differences

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions