Skip to content
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

Action for adjusting opacity at runtime #11205

Closed
bcosden opened this issue Sep 12, 2021 · 3 comments · Fixed by #12092
Closed

Action for adjusting opacity at runtime #11205

bcosden opened this issue Sep 12, 2021 · 3 comments · Fixed by #12092
Assignees
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@bcosden
Copy link
Member

bcosden commented Sep 12, 2021

Description of the new feature/enhancement

I love the pane of glass look for Terminal. However, when using a dark theme for example in Terminal and the window is in front-of a light colored windows (i.e. Browser with a white page), the text is unreadable in terminal. And when the Terminal is in front of a dark background the text color in Terminal is nice and crisp. What would be great is if the Terminal can detect the underlying window color and dynamically adjust the opacity to ensure the text of the Terminal window remains readable regardless of the window that Terminal is in front of.

Can't read text in Terminal with transparency in front of a light window when using a dark theme. In order to keep the pane of glass look, I need to keep adjusting the transparency setting based on the background colors (background theme and/or window the Terminal is overlaying). New functionality would automatically adjust this or at a minimum provide a hot key to adjust transparency on demand

Proposed technical implementation details (optional)

@bcosden bcosden added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Sep 12, 2021
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Sep 12, 2021
@zadjii-msft
Copy link
Member

zadjii-msft commented Sep 13, 2021

Wow, someone who wants a transparency feature that's not #11180, what a pleasant surprise 😅

I'm pretty sure there's not a good way for the Terminal to be able to know what the contents of the screen are underneath our window. However:

or at a minimum provide a hot key to adjust transparency on demand

Now that's something I can get behind, and something I was already planning for landing once #11180 merged and once I did the control settings refactor for #5000, so I'll leave this open to track that. Thanks!


edit: pseudo-spec

  • setOpactiy:
    • "opacity": (required) an integer number to set the opacity to.
    • "relative": (defaults to false)
      • If false, set the opacity to the given value, which should be between [0, 100].
      • If true, then use opacity as a relative adjustment to the current opacity. So the implementation would get the current opacity for this pane, then add this action's opacity to that value. Should be between [-100, 100]

This would allow both setting exactly 25% opacity with an action, and binding an action that increases/decreases the opacity one {amount}

@zadjii-msft zadjii-msft changed the title Dynamic transparency Action for adjusting opacity at runtime Sep 13, 2021
@zadjii-msft zadjii-msft added good first issue This is a fix that might be easier for someone to do as a first contribution Help Wanted We encourage anyone to jump in on these. Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Area-Settings Issues related to settings and customizability, for console or terminal and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Sep 13, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Sep 13, 2021
@zadjii-msft zadjii-msft removed Help Wanted We encourage anyone to jump in on these. good first issue This is a fix that might be easier for someone to do as a first contribution labels Sep 13, 2021
@zadjii-msft zadjii-msft added this to the Terminal v1.13 milestone Sep 20, 2021
@zadjii-msft zadjii-msft self-assigned this Nov 8, 2021
@zadjii-msft
Copy link
Member

adjust-opacity-preview-001

dev/migrie/f/11205-adjustOpacity is ready to go, but it's targeting #11619 so I need that reviewed first

@miniksa miniksa removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Dec 10, 2021
@ghost ghost added the In-PR This issue has a related PR label Jan 5, 2022
@ghost ghost closed this as completed in #12092 Jan 12, 2022
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Jan 12, 2022
ghost pushed a commit that referenced this issue Jan 12, 2022
Adds an action which can be used to change the opacity at runtime. This is a follow up to some of the other work I had been doing around opacity and settings previewing at the end of the year.

> edit: pseudo-spec
> 
> * `adjustOpacity`:
>   * `"opacity"`: (**required**) an integer number to set the opacity to.
>   * `"relative"`: (defaults to `true`)
>     * If false, set the opacity to the given value, which should be between [0, 100].
>     * If true, then use `opacity` as a relative adjustment to the current opacity. So the implementation would get the current opacity for this pane, then add this action's opacity to that value. Should be between [-100, 100]
> 
> This would allow both setting exactly 25% opacity with an action, and binding an action that increases/decreases the opacity one {amount}

It's preview-able too, which is neat. 

![adjust-opacity-preview-001](https://user-images.githubusercontent.com/18356694/140785805-5eecf6ec-0933-40e4-bcba-41b88d25b6a8.gif)



* [x] Closes #11205
* [x] I work here
* [x] Docs updated: MicrosoftDocs/terminal#477
@ghost
Copy link

ghost commented Feb 3, 2022

🎉This issue was addressed in #12092, which has now been successfully released as Windows Terminal Preview v1.13.10336.0.:tada:

Handy links:

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants