[PR #3471] [MERGED] Add Selection Background Color as a setting to Profiles and Col… #25378

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/3471
Author: @leonMSFT
Created: 11/7/2019
Status: Merged
Merged: 11/13/2019
Merged by: @zadjii-msft

Base: masterHead: dev/lelian/selectionBackgroundColor


📝 Commits (10+)

  • db9c4c1 adding selectionBackground to ColorScheme and TerminalSettings
  • 3ea3bbc Changing PaintSelection inside the renderers to take a SelectionBackground COLORREF
  • 1d2cd97 changes to conhost and terminal renderdata, and to terminal settings and core
  • ea3cc5b IT WORKS
  • 3df73bc modification of unit tests, json schemas, reordering of functions
  • 04d9857 more movement
  • a745812 changed a couple of unit tests to add selectionBackground, added the setting to schemas, also added the optional setting to profiles
  • 4a055de default selection background should be slightly offwhite like the default foreground is
  • 1f17ab1 reverting changes to .sln
  • 23d8ebd cleaning up

📊 Changes

16 files changed (+117 additions, -10 deletions)

View changed files

📝 doc/cascadia/SettingsSchema.md (+2 -0)
📝 doc/cascadia/profiles.schema.json (+8 -0)
📝 src/cascadia/LocalTests_TerminalApp/ColorSchemeTests.cpp (+7 -0)
📝 src/cascadia/LocalTests_TerminalApp/ProfileTests.cpp (+13 -2)
📝 src/cascadia/TerminalApp/ColorScheme.cpp (+19 -3)
📝 src/cascadia/TerminalApp/ColorScheme.h (+2 -0)
📝 src/cascadia/TerminalApp/Profile.cpp (+17 -0)
📝 src/cascadia/TerminalApp/Profile.h (+2 -0)
📝 src/cascadia/TerminalControl/TermControl.cpp (+8 -0)
📝 src/cascadia/TerminalSettings/IControlSettings.idl (+2 -0)
📝 src/cascadia/TerminalSettings/TerminalSettings.cpp (+11 -0)
📝 src/cascadia/TerminalSettings/terminalsettings.h (+3 -0)
📝 src/cascadia/UnitTests_TerminalCore/MockTermSettings.h (+2 -0)
📝 src/cascadia/ut_app/JsonTests.cpp (+2 -0)
📝 src/renderer/dx/DxRenderer.cpp (+16 -5)
📝 src/renderer/dx/DxRenderer.hpp (+3 -0)

📄 Description

Summary of the Pull Request

This introduces a setting to both Profiles and ColorSchemes called selectionBackground that allows you to change the selection background color to what's specified. If selectionBackground isn't set in either the profile or color scheme, it'll default to what it was before - white.

PR Checklist

Validation Steps Performed

  • Added selectionBackground to existing profile and colorscheme tests.
  • Verified that the color does change to what I expect it to be when I add "selectionBackground" to either/both a profile and a color scheme.

🔄 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/3471 **Author:** [@leonMSFT](https://github.com/leonMSFT) **Created:** 11/7/2019 **Status:** ✅ Merged **Merged:** 11/13/2019 **Merged by:** [@zadjii-msft](https://github.com/zadjii-msft) **Base:** `master` ← **Head:** `dev/lelian/selectionBackgroundColor` --- ### 📝 Commits (10+) - [`db9c4c1`](https://github.com/microsoft/terminal/commit/db9c4c1b3dde864d9954277eb0297b10410b83fd) adding selectionBackground to ColorScheme and TerminalSettings - [`3ea3bbc`](https://github.com/microsoft/terminal/commit/3ea3bbc0192bf847809d0a03f2abb0d259e81c8a) Changing PaintSelection inside the renderers to take a SelectionBackground COLORREF - [`1d2cd97`](https://github.com/microsoft/terminal/commit/1d2cd975aa9174c32dc1a6b22404a3c803b5a961) changes to conhost and terminal renderdata, and to terminal settings and core - [`ea3cc5b`](https://github.com/microsoft/terminal/commit/ea3cc5bbbfe9cc459b2c88532bbaf4aac112b81e) IT WORKS - [`3df73bc`](https://github.com/microsoft/terminal/commit/3df73bcd0a47577ec79ebb3e36a25cc49d1d88ad) modification of unit tests, json schemas, reordering of functions - [`04d9857`](https://github.com/microsoft/terminal/commit/04d98579ea349a56e17f00f40a33ff06c614e57a) more movement - [`a745812`](https://github.com/microsoft/terminal/commit/a745812c60c5b970da2bd318406d5271013b5627) changed a couple of unit tests to add selectionBackground, added the setting to schemas, also added the optional setting to profiles - [`4a055de`](https://github.com/microsoft/terminal/commit/4a055de0ac64a93ffc707a1d76b278b333bc98ac) default selection background should be slightly offwhite like the default foreground is - [`1f17ab1`](https://github.com/microsoft/terminal/commit/1f17ab16ea381a92cbf88021017de3b2c60d2f8c) reverting changes to .sln - [`23d8ebd`](https://github.com/microsoft/terminal/commit/23d8ebdc5d8e48ca41a4e66bc8926ccd80c7dc15) cleaning up ### 📊 Changes **16 files changed** (+117 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `doc/cascadia/SettingsSchema.md` (+2 -0) 📝 `doc/cascadia/profiles.schema.json` (+8 -0) 📝 `src/cascadia/LocalTests_TerminalApp/ColorSchemeTests.cpp` (+7 -0) 📝 `src/cascadia/LocalTests_TerminalApp/ProfileTests.cpp` (+13 -2) 📝 `src/cascadia/TerminalApp/ColorScheme.cpp` (+19 -3) 📝 `src/cascadia/TerminalApp/ColorScheme.h` (+2 -0) 📝 `src/cascadia/TerminalApp/Profile.cpp` (+17 -0) 📝 `src/cascadia/TerminalApp/Profile.h` (+2 -0) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+8 -0) 📝 `src/cascadia/TerminalSettings/IControlSettings.idl` (+2 -0) 📝 `src/cascadia/TerminalSettings/TerminalSettings.cpp` (+11 -0) 📝 `src/cascadia/TerminalSettings/terminalsettings.h` (+3 -0) 📝 `src/cascadia/UnitTests_TerminalCore/MockTermSettings.h` (+2 -0) 📝 `src/cascadia/ut_app/JsonTests.cpp` (+2 -0) 📝 `src/renderer/dx/DxRenderer.cpp` (+16 -5) 📝 `src/renderer/dx/DxRenderer.hpp` (+3 -0) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This introduces a setting to both Profiles and ColorSchemes called <code>selectionBackground</code> that allows you to change the selection background color to what's specified. If <code>selectionBackground</code> isn't set in either the profile or color scheme, it'll default to what it was before - white. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #3326 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed * [x] Requires documentation to be updated <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed - Added selectionBackground to existing profile and colorscheme tests. - Verified that the color does change to what I expect it to be when I add "selectionBackground" to either/both a profile and a color scheme. --- <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:09:09 +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#25378