-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flash the pane dark when BEL is emitted in a light terminal #13707
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for whipping this up!
{ | ||
_bellLightAnimation = Window::Current().Compositor().CreateScalarKeyFrameAnimation(); | ||
// Add key frames and a duration to our bell light animation | ||
_bellLightAnimation.InsertKeyFrame(0.0, 2.0); | ||
_bellLightAnimation.InsertKeyFrame(1.0, 1.0); | ||
_bellLightAnimation.InsertKeyFrame(0.0, 4.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, right, okay, I get it. I was all confused why the current animation was moved to the light-colored BGs.
Before, we had a White
light, that we animated from 2->1 Intensity
. Now we've got a Gray
light, so for dark BGs, we need a different animation. It's coincidental that the light BG version of the animation just so happens to use 1->2 Intensity
(but now that I've typed it, I'm better realizing that's not even the same values as before 😅)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amazing, thank you.
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
Adds a variable
_isBackgroundLight
that is updated when the backgroundcolor is changed. When it is
true
, the BEL indicator flash will darkenthe screen instead of brightening.
_isColorLight(bg)
returnstrue
if the average ofr
,g
, andb
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 begray and adjusted the intensity values of the original animation to have
roughly the same visual effect as the white.
Validation Steps Performed
background colors to see if they look consistent
(including multiple tabs, split windows with different themes, and
changing settings while window is open)
References #9270
Closes #13450