[PR #5224] Force all our dialogs into the application theme, forcibly #26194

Closed
opened 2026-01-31 09:14:32 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/5224

State: closed
Merged: Yes


Because we cannot set RequestedTheme at the application level, we
occasionally run into issues where parts of our UI end up themed
incorrectly. Dialogs, for example, live under a different Xaml root
element than the rest of our application. This makes our popup menus and
buttons "disappear" when the user wants Terminal to be in a different
theme than the rest of the system. This hack---and it is a
hack--walks up a dialog's ancestry and forces the theme on each element
up to the root. We're relying a bit on Xaml's implementation details
here, but it does have the desired effect.

It's not enough to set the theme on the dialog alone.

Fixes #3654.
Fixes #5195.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/5224 **State:** closed **Merged:** Yes --- Because we cannot set RequestedTheme at the application level, we occasionally run into issues where parts of our UI end up themed incorrectly. Dialogs, for example, live under a different Xaml root element than the rest of our application. This makes our popup menus and buttons "disappear" when the user wants Terminal to be in a different theme than the rest of the system. This hack---and it _is_ a hack--walks up a dialog's ancestry and forces the theme on each element up to the root. We're relying a bit on Xaml's implementation details here, but it does have the desired effect. It's not enough to set the theme on the dialog alone. Fixes #3654. Fixes #5195.
claunia added the pull-request label 2026-01-31 09:14:32 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26194