[PR #13689] [MERGED] Add support for tab.unfocusedBackground #29706

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13689
Author: @zadjii-msft
Created: 8/5/2022
Status: Merged
Merged: 8/31/2022
Merged by: @zadjii-msft

Base: mainHead: dev/migrie/b/13684-inactiveTabBg


📝 Commits (10+)

  • 57e02b8 sometimes I do the code good
  • fe5a86d Merge remote-tracking branch 'origin/main' into dev/migrie/b/13684-inactiveTabBg
  • bdfb015 Allow the settings tab to also have a color set by the theme
  • 4146d71 default settings changes
  • f911929 transparent inactive tabs on light tab row, when the tabs have a dark FG color, works sanely now
  • 2964ebe comments
  • 37ce107 I can't tell you how much I hate this
  • 25e09d6 comments galore
  • b38b704 Merge branch 'dev/migrie/b/13554-new-default-theme' into dev/migrie/b/13684-inactiveTabBg
  • 48deba0 Revert the changes I made to the default themes

📊 Changes

14 files changed (+480 additions, -315 deletions)

View changed files

📝 src/cascadia/TerminalApp/App.xaml (+9 -0)
📝 src/cascadia/TerminalApp/SettingsTab.cpp (+19 -1)
📝 src/cascadia/TerminalApp/SettingsTab.h (+6 -1)
📝 src/cascadia/TerminalApp/TabBase.cpp (+289 -0)
📝 src/cascadia/TerminalApp/TabBase.h (+15 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+18 -70)
📝 src/cascadia/TerminalApp/TerminalTab.cpp (+5 -229)
📝 src/cascadia/TerminalApp/TerminalTab.h (+3 -12)
📝 src/cascadia/TerminalSettingsModel/MTSMSettings.h (+3 -2)
📝 src/cascadia/TerminalSettingsModel/Theme.cpp (+24 -0)
📝 src/cascadia/TerminalSettingsModel/Theme.h (+1 -0)
📝 src/cascadia/TerminalSettingsModel/Theme.idl (+2 -0)
📝 src/cascadia/WinRTUtils/inc/Utils.h (+63 -0)
📝 src/inc/til/color.h (+23 -0)

📄 Description

Does what it sounds like on the label.

This is important, because when unset, the tab will use the active Background color to create an inactive BG, which maybe isn't what we want. Consider:

  • a bright cyan active BG,
  • and terminalBG for the tabRow bg.

Without an unfocusedBackground setting, all the tabs will still appear cyan when unfocused, which is extra gross.

As a judgement call, I made terminalBackground and accent use 30% opacity when set, to match the existing coloration.

See also #13554. If we want to make the default theme tab.background: terminalBackground, we should make tab.unfocusedBackground transparent (#00000000) by default. Otherwise, a Campell (#0c0c0c) tab on any tab row will still have a faint tab visible.

This also does a lot of code shuffling, to get SettingsUI tabs to behave sensibly. We want those tabs to have (#0c0c0c, #ffffff) colored BGs for terminalBackground (see mail thread).

We also don't want dark focused tabs colors, combined with light tab row colors, combined with transparent unfocused tabs, to result in unfocused tabs having white-on-white text. That's gross. So that's been added to this PR in b38b704.


🔄 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/13689 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 8/5/2022 **Status:** ✅ Merged **Merged:** 8/31/2022 **Merged by:** [@zadjii-msft](https://github.com/zadjii-msft) **Base:** `main` ← **Head:** `dev/migrie/b/13684-inactiveTabBg` --- ### 📝 Commits (10+) - [`57e02b8`](https://github.com/microsoft/terminal/commit/57e02b885be361129fe9e0ad0a3c9d904b1efc22) sometimes I do the code good - [`fe5a86d`](https://github.com/microsoft/terminal/commit/fe5a86d717ed422c80e5cc48780782e4cca8ff86) Merge remote-tracking branch 'origin/main' into dev/migrie/b/13684-inactiveTabBg - [`bdfb015`](https://github.com/microsoft/terminal/commit/bdfb015a3b339dd710fccd861e77b3552ff68bb1) Allow the settings tab to also have a color set by the theme - [`4146d71`](https://github.com/microsoft/terminal/commit/4146d71079a2a1c3812ee7b32457b1d4f1081bbf) default settings changes - [`f911929`](https://github.com/microsoft/terminal/commit/f911929e43cb612c30f316240366ee03cdb4361c) transparent inactive tabs on light tab row, when the tabs have a dark FG color, works sanely now - [`2964ebe`](https://github.com/microsoft/terminal/commit/2964ebe70ffe98ae22833d6954e82ce23b803ad1) comments - [`37ce107`](https://github.com/microsoft/terminal/commit/37ce10705a6b7d8d35f3ae25c04f9e79d552480d) I can't tell you how much I hate this - [`25e09d6`](https://github.com/microsoft/terminal/commit/25e09d695afa7d31f28fa61e25d7de126cb7c2df) comments galore - [`b38b704`](https://github.com/microsoft/terminal/commit/b38b7047bd9aae376e68762584d2fec74da12bef) Merge branch 'dev/migrie/b/13554-new-default-theme' into dev/migrie/b/13684-inactiveTabBg - [`48deba0`](https://github.com/microsoft/terminal/commit/48deba0245c801ed0e76a55f377c3e700b6ae718) Revert the changes I made to the default themes ### 📊 Changes **14 files changed** (+480 additions, -315 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/App.xaml` (+9 -0) 📝 `src/cascadia/TerminalApp/SettingsTab.cpp` (+19 -1) 📝 `src/cascadia/TerminalApp/SettingsTab.h` (+6 -1) 📝 `src/cascadia/TerminalApp/TabBase.cpp` (+289 -0) 📝 `src/cascadia/TerminalApp/TabBase.h` (+15 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+18 -70) 📝 `src/cascadia/TerminalApp/TerminalTab.cpp` (+5 -229) 📝 `src/cascadia/TerminalApp/TerminalTab.h` (+3 -12) 📝 `src/cascadia/TerminalSettingsModel/MTSMSettings.h` (+3 -2) 📝 `src/cascadia/TerminalSettingsModel/Theme.cpp` (+24 -0) 📝 `src/cascadia/TerminalSettingsModel/Theme.h` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/Theme.idl` (+2 -0) 📝 `src/cascadia/WinRTUtils/inc/Utils.h` (+63 -0) 📝 `src/inc/til/color.h` (+23 -0) </details> ### 📄 Description Does what it sounds like on the label. This is important, because when unset, the tab will use the active `Background` color to create an inactive BG, which maybe isn't what we want. Consider: - a bright cyan active BG, - and `terminalBG` for the `tabRow` bg. Without an unfocusedBackground setting, all the tabs will still appear cyan when unfocused, which is extra gross. As a judgement call, I made `terminalBackground` and `accent` use 30% opacity when set, to match the existing coloration. See also #13554. If we want to make the default theme `tab.background: terminalBackground`, we should make `tab.unfocusedBackground` transparent (`#00000000`) by default. Otherwise, a Campell (`#0c0c0c`) tab on _any_ tab row will still have a faint tab visible. * closes #13684 * closes #13246 * tested manually This also does a lot of code shuffling, to get SettingsUI tabs to behave sensibly. We want those tabs to have (`#0c0c0c`, `#ffffff`) colored BGs for `terminalBackground` (see mail thread). We also don't want dark focused tabs colors, combined with light tab row colors, combined with transparent unfocused tabs, to result in unfocused tabs having white-on-white text. That's gross. So that's been added to this PR in b38b704. --- <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:36:26 +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#29706