[PR #13707] [MERGED] Flash the pane dark when BEL is emitted in a light terminal #29726

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13707
Author: @Fyrebright
Created: 8/9/2022
Status: Merged
Merged: 8/11/2022
Merged by: @undefined

Base: mainHead: bug/13450-dark-bel-flash


📝 Commits (4)

  • 5146332 add light color check and dark version of animation
  • 27df1e1 remove unnecessary float
  • 01fb4b6 apply suggestions from code review
  • 2c0c69c Spellbot + reword comment

📊 Changes

4 files changed (+39 additions, -5 deletions)

View changed files

📝 .github/actions/spelling/expect/expect.txt (+1 -0)
📝 src/cascadia/TerminalControl/TermControl.cpp (+33 -4)
📝 src/cascadia/TerminalControl/TermControl.h (+4 -0)
📝 src/cascadia/TerminalControl/XamlLights.cpp (+1 -1)

📄 Description

Adds a variable _isBackgroundLight that is updated when the background
color is changed. When it is true, the BEL indicator flash will darken
the screen instead of brightening.

_isColorLight(bg) returns true if the average of r, g, and b
is >127

I was unsure of an appropriate way to change the color of the
CompositionLight based on the background, so I changed it to always be
gray and adjusted the intensity values of the original animation to have
roughly the same visual effect as the white.

Validation Steps Performed

  • Tested the two flashes on the default color schemes and some custom
    background colors to see if they look consistent
  • Used tracepoints and visual to check that the right animation is used
    (including multiple tabs, split windows with different themes, and
    changing settings while window is open)

References #9270
Closes #13450


🔄 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/13707 **Author:** [@Fyrebright](https://github.com/Fyrebright) **Created:** 8/9/2022 **Status:** ✅ Merged **Merged:** 8/11/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `bug/13450-dark-bel-flash` --- ### 📝 Commits (4) - [`5146332`](https://github.com/microsoft/terminal/commit/514633269d281386fbccf88858da2a4fb71a3664) add light color check and dark version of animation - [`27df1e1`](https://github.com/microsoft/terminal/commit/27df1e134df523aab1901e07f9fd190a5c0a99fa) remove unnecessary float - [`01fb4b6`](https://github.com/microsoft/terminal/commit/01fb4b688d11c718776eaa9d54b3e14bb37b9ab6) apply suggestions from code review - [`2c0c69c`](https://github.com/microsoft/terminal/commit/2c0c69cc7d18e78acea28e7c9567e1bc6fd31620) Spellbot + reword comment ### 📊 Changes **4 files changed** (+39 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spelling/expect/expect.txt` (+1 -0) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+33 -4) 📝 `src/cascadia/TerminalControl/TermControl.h` (+4 -0) 📝 `src/cascadia/TerminalControl/XamlLights.cpp` (+1 -1) </details> ### 📄 Description Adds a variable `_isBackgroundLight` that is updated when the background color is changed. When it is `true`, the BEL indicator flash will darken the screen instead of brightening. `_isColorLight(bg)` returns `true` if the average of `r`, `g`, and `b` is >127 I was unsure of an appropriate way to change the color of the `CompositionLight` based on the background, so I changed it to always be gray and adjusted the intensity values of the original animation to have roughly the same visual effect as the white. ## Validation Steps Performed * Tested the two flashes on the default color schemes and some custom background colors to see if they look consistent * Used tracepoints and visual to check that the right animation is used (including multiple tabs, split windows with different themes, and changing settings while window is open) References #9270 Closes #13450 --- <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:32 +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#29726