Skip to content

System Theme Reactions#3051

Merged
hecrj merged 16 commits intomasterfrom
replace-dark-light
Sep 8, 2025
Merged

System Theme Reactions#3051
hecrj merged 16 commits intomasterfrom
replace-dark-light

Conversation

@hecrj
Copy link
Copy Markdown
Member

@hecrj hecrj commented Sep 7, 2025

This PR removes the auto-detect-theme feature by implementing it directly on top of winit without adding extra dependencies.

The main drawback is that Wayland and X11 are not supported, but supporting those environments (and poorly, anyways) is an absolute dependency nightmare.

In any case, users of iced applications that use the built-in Theme can leverage the new ICED_THEME env variable to choose their favorite flavor.

@hecrj hecrj added this to the 0.14 milestone Sep 7, 2025
@hecrj hecrj added improvement An internal improvement styling change labels Sep 7, 2025
@hecrj
Copy link
Copy Markdown
Member Author

hecrj commented Sep 7, 2025

Eventually, we'll want to leverage the preferences subscription to dynamically change the preferred color scheme at runtime.

Ah... The test failures tell us that time has arrived.

@hecrj hecrj changed the title Replace dark-light with mundy Use winit directly to implement the auto-detect-theme feature Sep 8, 2025
@hecrj hecrj changed the title Use winit directly to implement the auto-detect-theme feature System Theme Reactions Sep 8, 2025
@hecrj hecrj force-pushed the replace-dark-light branch from 1f9daa1 to b5974a2 Compare September 8, 2025 09:33
@hecrj
Copy link
Copy Markdown
Member Author

hecrj commented Sep 8, 2025

I finally added a linux-theme-detection feature that leverages mundy to keep feature parity. It still brings down the dependencies from 439 to 401 for the tour on Linux.

Additionally, mundy let's us keep track of theme changes at runtime; so applications should automatically switch themes when using the system fallback (i.e. theme returns None).

@hecrj hecrj force-pushed the replace-dark-light branch from 0a0ac4f to 323b17d Compare September 8, 2025 10:11
@hecrj hecrj enabled auto-merge September 8, 2025 12:41
@hecrj hecrj merged commit a9091f9 into master Sep 8, 2025
30 checks passed
@hecrj hecrj deleted the replace-dark-light branch September 8, 2025 12:50
@jtojnar jtojnar mentioned this pull request Feb 2, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change improvement An internal improvement styling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant