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

add adjustOpacity #477

Merged
merged 2 commits into from
Jan 24, 2022
Merged

Conversation

zadjii-msft
Copy link
Contributor

@zadjii-msft zadjii-msft commented Jan 7, 2022

from microsoft/terminal#12092

⚠️ This might need to go into the 1.13 branch ⚠️

Adjust opacity (Preview)

This changes the opacity of the window. If relative is set to true, it will adjust the opacity relative to the current opacity. Otherwise, it will set the opacity directly to the given opacity

Command name: adjustOpacity

Default bindings:

{ "command": { "action": "adjustOpacity", "relative": false, "opacity": 0 } },
{ "command": { "action": "adjustOpacity", "relative": false, "opacity": 25 } },
{ "command": { "action": "adjustOpacity", "relative": false, "opacity": 50 } },
{ "command": { "action": "adjustOpacity", "relative": false, "opacity": 100 } }

Actions

Name Necessity Accepts Description
opacity Optional Integer How opaque the terminal should become or how much the opacity should be changed by, depending on the value of relative
relative Optional Boolean If true, then adjust the current opacity by the given opacity parameter. If false, set the opacity to exactly that value.

Important

This feature is only available in Windows Terminal Preview.

@opbld31
Copy link

opbld31 commented Jan 7, 2022

Docs Build status updates of commit 9d9ff60:

✅ Validation status: passed

File Status Preview URL Details
TerminalDocs/customize-settings/actions.md ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

ghost pushed a commit to microsoft/terminal that referenced this pull request 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
@cinnamon-msft cinnamon-msft changed the base branch from main to release-1.13 January 20, 2022 23:11
@opbld31
Copy link

opbld31 commented Jan 20, 2022

Docs Build status updates of commit 9d9ff60:

✅ Validation status: passed

File Status Preview URL Details
TerminalDocs/customize-settings/actions.md ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@cinnamon-msft cinnamon-msft merged commit 8375daa into release-1.13 Jan 24, 2022
@cinnamon-msft cinnamon-msft deleted the dev/migrie/12092-adjustOpacity branch January 24, 2022 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants