Skip to content

winit-uikit: detect system dark/light theme#4570

Open
tronical wants to merge 1 commit into
rust-windowing:masterfrom
slint-ui:simon/ios-theme
Open

winit-uikit: detect system dark/light theme#4570
tronical wants to merge 1 commit into
rust-windowing:masterfrom
slint-ui:simon/ios-theme

Conversation

@tronical
Copy link
Copy Markdown
Contributor

@tronical tronical commented May 19, 2026

Apps targeting iOS could neither query nor react to the system appearance. Implement Window::theme, Window::set_theme, WindowAttributes::preferred_theme via userInterfaceStyle, and emit WindowEvent::ThemeChanged via registerForTraitChanges (iOS 17.0+), so winit apps participate in iOS appearance changes like they do on macOS.

cc #3994

  • Tested on all platforms changed
  • Added an entry to the changelog module if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality

Apps targeting iOS could neither query nor react to the system
appearance. Implement `Window::theme`, `Window::set_theme`,
`WindowAttributes::preferred_theme` via `userInterfaceStyle`, and emit
`WindowEvent::ThemeChanged` via `registerForTraitChanges` (iOS 17.0+),
so winit apps participate in iOS appearance changes like they do on
macOS.

cc rust-windowing#3994
@tronical tronical requested a review from madsmtm as a code owner May 19, 2026 15:24
tronical added a commit to slint-ui/slint that referenced this pull request May 20, 2026
This is here until rust-windowing/winit#4570
lands in a winit release we can use.

ChangeLog: iOS: Added detection of system dark/light theme
tronical added a commit to slint-ui/slint that referenced this pull request May 20, 2026
This is here until rust-windowing/winit#4570
lands in a winit release we can use.

ChangeLog: iOS: Added detection of system dark/light theme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant