[PR #14188] [CLOSED] Use the Windows.UI.ViewManagement APIs to get the accent color #29988

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14188
Author: @DHowett
Created: 10/11/2022
Status: Closed

Base: mainHead: dev/duhowett/no-private-registry-keys


📝 Commits (2)

  • f20405c Use the Windows.UI.ViewManagement APIs to get the accent color
  • f3312ff no strings attached

📊 Changes

2 files changed (+8 additions, -33 deletions)

View changed files

📝 src/cascadia/TerminalSettingsModel/Theme.cpp (+7 -33)
📝 src/cascadia/TerminalSettingsModel/pch.h (+1 -0)

📄 Description

Judging by the source (which is admittedly rather complex), the accent color value returned by this API is the same one that DWM stores in the registry. Doing it this way obviates the need for us to do a themed resource map lookup, pass a XAML resource map into MTSM, and dump somebody's secret registry keys into the open.


🔄 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/14188 **Author:** [@DHowett](https://github.com/DHowett) **Created:** 10/11/2022 **Status:** ❌ Closed **Base:** `main` ← **Head:** `dev/duhowett/no-private-registry-keys` --- ### 📝 Commits (2) - [`f20405c`](https://github.com/microsoft/terminal/commit/f20405cf56f54375688b93c8496b4fc98da883f5) Use the Windows.UI.ViewManagement APIs to get the accent color - [`f3312ff`](https://github.com/microsoft/terminal/commit/f3312ff2f6ed066600aa62a846fef2eccfba85bf) no strings attached ### 📊 Changes **2 files changed** (+8 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalSettingsModel/Theme.cpp` (+7 -33) 📝 `src/cascadia/TerminalSettingsModel/pch.h` (+1 -0) </details> ### 📄 Description Judging by the source (which is admittedly rather complex), the accent color value returned by this API is the same one that DWM stores in the registry. Doing it this way obviates the need for us to do a themed resource map lookup, pass a XAML resource map into MTSM, and dump somebody's secret registry keys into the open. --- <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:02 +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#29988