[PR #14497] [MERGED] Enable switching app theme based off of OS theme #30118

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14497
Author: @zadjii-msft
Created: 12/6/2022
Status: Merged
Merged: 1/12/2023
Merged by: @undefined

Base: mainHead: dev/migrie/f/theme-theme-switch-switch


📝 Commits (10+)

  • 3d5d88a inintial buggy fix for syncing OS themes
  • 5f54750 fixed control preview bug
  • 43cc9fa Code cleanup
  • e4c2d20 Code cleanup
  • b1c5342 updated bug, where custom themes would not update the color scheme
  • e4f3625 updated bug, where custom themes would not update the color scheme
  • c16b998 PR lhecker comments
  • 4e40eff formatting fix
  • 367d38c formatting fix
  • fdc2c80 Merge remote-tracking branch 'origin/main' into ThemeControlledColorSchemeSwitch

📊 Changes

11 files changed (+169 additions, -22 deletions)

View changed files

📝 src/cascadia/TerminalSettingsEditor/GlobalAppearanceViewModel.cpp (+1 -1)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp (+27 -7)
📝 src/cascadia/TerminalSettingsModel/GlobalAppSettings.cpp (+17 -1)
📝 src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl (+1 -1)
📝 src/cascadia/TerminalSettingsModel/MTSMSettings.h (+1 -1)
📝 src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj (+1 -0)
src/cascadia/TerminalSettingsModel/SettingsUtils.h (+6 -0)
📝 src/cascadia/TerminalSettingsModel/TerminalSettings.cpp (+12 -11)
📝 src/cascadia/TerminalSettingsModel/Theme.cpp (+42 -0)
📝 src/cascadia/TerminalSettingsModel/Theme.h (+51 -0)
📝 src/cascadia/TerminalSettingsModel/Theme.idl (+10 -0)

📄 Description

This is basically just like #14064, but with the theme instead.

If you define a pair of theme names:

    "theme": { "dark": "light", "light": "dark" },

then the Terminal will use the one relevant for the current OS theme. This cooperates with #14064, who sets the scheme based on the app's theme.

This was spec'd as a part of #3327 / #12530, but never promoted to its own issue.
Gif below.


🔄 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/14497 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 12/6/2022 **Status:** ✅ Merged **Merged:** 1/12/2023 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/f/theme-theme-switch-switch` --- ### 📝 Commits (10+) - [`3d5d88a`](https://github.com/microsoft/terminal/commit/3d5d88a41def9d7e17fabfe44b20992f1419f5c8) inintial buggy fix for syncing OS themes - [`5f54750`](https://github.com/microsoft/terminal/commit/5f547501b56d112447d87f121bb28b8f664162f1) fixed control preview bug - [`43cc9fa`](https://github.com/microsoft/terminal/commit/43cc9fadd602028f47f850de62be8bf1c48fc172) Code cleanup - [`e4c2d20`](https://github.com/microsoft/terminal/commit/e4c2d202ea29d08d6191d1d591bbc945f453a865) Code cleanup - [`b1c5342`](https://github.com/microsoft/terminal/commit/b1c53424e16f1db67d386599252d666c51af9c15) updated bug, where custom themes would not update the color scheme - [`e4f3625`](https://github.com/microsoft/terminal/commit/e4f362579e62e57beab7c75b09484da5f2b712d5) updated bug, where custom themes would not update the color scheme - [`c16b998`](https://github.com/microsoft/terminal/commit/c16b998e6f9ccbfefd7fe37ef8cd8ec3b116cf65) PR lhecker comments - [`4e40eff`](https://github.com/microsoft/terminal/commit/4e40eff737581ce170dec788c51be6b2ef49396a) formatting fix - [`367d38c`](https://github.com/microsoft/terminal/commit/367d38ce145c48b8f04348f1257f3bde4f0f39b9) formatting fix - [`fdc2c80`](https://github.com/microsoft/terminal/commit/fdc2c80b87a44b916490ca5e5dc7fd2c09b1110f) Merge remote-tracking branch 'origin/main' into ThemeControlledColorSchemeSwitch ### 📊 Changes **11 files changed** (+169 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalSettingsEditor/GlobalAppearanceViewModel.cpp` (+1 -1) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp` (+27 -7) 📝 `src/cascadia/TerminalSettingsModel/GlobalAppSettings.cpp` (+17 -1) 📝 `src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl` (+1 -1) 📝 `src/cascadia/TerminalSettingsModel/MTSMSettings.h` (+1 -1) 📝 `src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj` (+1 -0) ➕ `src/cascadia/TerminalSettingsModel/SettingsUtils.h` (+6 -0) 📝 `src/cascadia/TerminalSettingsModel/TerminalSettings.cpp` (+12 -11) 📝 `src/cascadia/TerminalSettingsModel/Theme.cpp` (+42 -0) 📝 `src/cascadia/TerminalSettingsModel/Theme.h` (+51 -0) 📝 `src/cascadia/TerminalSettingsModel/Theme.idl` (+10 -0) </details> ### 📄 Description This is basically just like #14064, but with the `theme` instead. If you define a pair of `theme` names: ```json "theme": { "dark": "light", "light": "dark" }, ``` then the Terminal will use the one relevant for the current OS theme. This cooperates with #14064, who sets the `scheme` based on the app's theme. This was spec'd as a part of #3327 / #12530, but never promoted to its own issue. Gif below. --- <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:38:45 +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#30118