-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Enable unfocused acrylic #15923
Enable unfocused acrylic #15923
Conversation
…focusstate change
…GroundColor I left it out
…n ApplyAppearance
There were a lot of commits let me know if you want me to squash them |
All your commits will be squashed automatically when the pull request merges into main. 🙂 |
This is very nice, thank you for doing it! We'll review it over the next few days. 😄 |
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.
The PR looks good to me, and I'd approve it, but I haven't understood yet why EnableUnfocusedAcrylic
is necessary if we already have UseAcrylic
for the unfocused appearance.
Last time we brought this up in team sync (probably >1yr ago), there was discussion of having a global opt-out of unfocused acrylic to revert to the old behavior. Just as a potential compat setting. Or something that we could override with some sort of "battery saver mode" (ala #9600). |
Okay , thanks for the heads up! @lhecker @zadjii-msft @DHowett |
FWIW, don't worry too much about our "battery saver" sidebar for now. That's something that needs a lot more noodling on before we start committing any code. |
nit Co-authored-by: Mike Griese <migrie@microsoft.com>
Updated eventargs to use Opacity() Co-authored-by: Mike Griese <migrie@microsoft.com>
@zadjii-msft @lhecker Not sure if it's a problem, seems to be the default behaviour of Backdrop, there's a see through at the edge where it's somewhat transparent instead of acrylic. and it seems a nit bit less bright, can you spot it? Both are at I can make it so that Backdrop brush is only used when Unfocused , would really miss the bright Acrylic otherwise :( as compared to both having the Backdrop I asked the users which one they like more. |
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.
Okay re-talked over the global setting thing with Dustin. Refreshed his memory on having one in the first place.
- Yea, sure it's partially redundant with just not putting
useAcrylic
in an unfocused appearance - HostBackdrop acrylic is slightly different from
Backdrop
acrylic. That global compat setting does give folks a chance to opt back to the old appearance. - We can always add an infobar in Profiles_Appearance in the future to let folks know "hey this won't work cause you have the global setting off"
- Maybe folks who have spicy pillows like me don't want to have acrylic on when the window is inactive, but want it always on if the window is active (but on even if the control isn't focused). The global setting is good for that case.
- It can later be futzed with after we refine batter saver settings
So, he's cool with it 👍
@zadjii-msft @lhecker I would like that, why did that not happen? How can I get that? I guess PR's need to have more lines of code? @carlos-zamora I think battery saver mode would make it way higher quality for what it's worth. |
Not every code review is going to go the same way! As an example, James Holderness submits huge pull requests that get very few comments. It's because he is comfortable with our code, and we are comfortable with the way that he does his work. Now, not everybody has been working with the team for as long as he has--like tusharsnx (#15795). They are not familiar with our practices, but they ARE still submitting large changes. The bottom line is: If you submit small changes, they are less contentious. There is less stuff to talk about, or to be worried about. This is a good thing! If you submit larger changes, there are more points for discussion. More code, more arguments, more areas. The more stuff you touch at once, the closer the team has to look to make sure it all fits together right. Sometimes, it goes smoothly. You just do everything perfectly. Sometimes, it goes differently and you get a lot of comments. Maybe there's something you understand very well (and we won't challenge you!) or you've done a lot of research (and the PR goes smoothly)... and sometimes you need to be taught something about how the project fits together or how the language works, etc. As you submit more and larger pull requests, you'll get more comments. Eventually, you will be so good at it that you will get less and less comments! 😄 |
Yea I couldn't have said anything more. If I had anything to add, it might be that we hashed out a lot of the edge cases in the side discussion in #2531 before you even got to the PR 😄 (this is a good thing) |
@zadjii-msft @DHowett @lhecker Are there any relevant opportunities at Microsoft that would let me work on this project or similar ones to it? |
@zadjii-msft @lhecker @DHowett Checked it out, wanted to point out that https://[raw.githubusercontent.com/microsoft/terminal/release-1.18/doc/cascadia/profiles.schema.json |
Summary of the Pull Request
Closes #7158
Enabling Acrylic as both an appearance setting (with all the plumbing), allowing it to be set differently in both focused and unfocused terminals. EnableUnfocusedAcrylic Global Setting that controls if unfocused acrylic is possible so that people can disable that behavior.
References and Relevant Issues
#7158 , references: #15913 , #11092
Detailed Description of the Pull Request / Additional comments
Allowing Acrylic to be set differently in both focused and unfocused terminals:
A
B
C
D
EnableUnfocusedACrylic global setting that controls if unfocused acrylic is possible
So that people can disable that behavior:
Alternate approaches I considered:
Using
_InitializeBackgroundBrush
call instead of_changeBackgroundColor(bg) in ``TermControl::_UpdateAppearanceFromUIThread
. Comments in this function mentioned:I considered using this to tackle to problem, but don't see the benefit. The only time we need to update the brush is when the user changes the
EnableUnfocusedAcrylic
setting which is already covered byfire_and_forget TermControl::UpdateControlSettings
Supporting different Opacity in Focused and Unfocused Appearance???
This PR is split up in two parts #7158 covers allowing Acrylic to be set differently in both focused and unfocused terminals. And EnableUnfocusedAcrylic Global Setting that controls if unfocused acrylic is possible so that people can disable that behavior.
#11092 will be about enabling opacity as both an appearance setting, allowing it to be set differently in both focused and unfocused terminals.
Skipping the XAML for now:
“I actually think we may want to skip the XAML on this one for now. We've been having some discussions about compatibility settings, global settings, stuff like this, and it might be _more- confusing to have you do something here. We can always add it in post when we decide where to put it.”
-- Mike Griese
Validation Steps Performed
When Scrolling Mouse , opacity changes appropriately, on opacity 100 there are no gray lines or artefacts
When Adjusting Opacity through command palette, opacity changes appropriately, on opacity 100 there are no gray lines or artefacts
When opening command palette state goes to unfocused, the acrylic and color change appropriately
Stumbled upon a new bug when performing validation steps #15913
PR Checklist