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

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/5224
Author: @DHowett-MSFT
Created: 4/3/2020
Status: Merged
Merged: 4/3/2020
Merged by: @undefined

Base: masterHead: dev/duhowett/lets_have_a_dialogue_about_this


📝 Commits (3)

  • a48bff8 Force all our dialogs into the application theme
  • 7833630 Actually just theme the dialog even after it's loaded
  • 0777c97 This is actually easier

📊 Changes

1 file changed (+21 additions, -1 deletions)

View changed files

📝 src/cascadia/TerminalApp/AppLogic.cpp (+21 -1)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/5224 **Author:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Created:** 4/3/2020 **Status:** ✅ Merged **Merged:** 4/3/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/duhowett/lets_have_a_dialogue_about_this` --- ### 📝 Commits (3) - [`a48bff8`](https://github.com/microsoft/terminal/commit/a48bff85316071a60ce5c31b21aad86b1b46f8aa) Force all our dialogs into the application theme - [`7833630`](https://github.com/microsoft/terminal/commit/7833630c5838f9f3e804ecf81c511204043098d4) Actually just theme the dialog even after it's loaded - [`0777c97`](https://github.com/microsoft/terminal/commit/0777c97e8e27082390ae9f900115f47d4271f016) This is actually easier ### 📊 Changes **1 file changed** (+21 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+21 -1) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:14:30 +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#26189