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

[1.12] Setting opacity as profiles.defaults doesn't work #11355

Closed
zadjii-msft opened this issue Sep 28, 2021 · 1 comment · Fixed by #11363
Closed

[1.12] Setting opacity as profiles.defaults doesn't work #11355

zadjii-msft opened this issue Sep 28, 2021 · 1 comment · Fixed by #11363
Assignees
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@zadjii-msft
Copy link
Member

zadjii-msft commented Sep 28, 2021

discovered in the 1.12 bug bash on 9/28

"profiles": 
    {
        "defaults": 
        {
            "opacity": 90
        },
        "list": 
        [
            {
                "commandline": "powershell.exe",
                "experimental.retroTerminalEffect": true,
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell",
                "opacity": 10,
                "unfocusedAppearance": 
                {
                    "colorScheme": "Solarized Light"
                }
            },
            {
                "commandline": "cmd.exe",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt"
            },

CMD should be 90% opaque, it's 100%. We're thinking this was a bad merge, since other appearance settings work in the defaults.

Probably regressed in #11184

@zadjii-msft zadjii-msft added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Settings Issues related to settings and customizability, for console or terminal Product-Terminal The new Windows Terminal. Priority-1 A description (P1) labels Sep 28, 2021
@zadjii-msft zadjii-msft added this to the Terminal v1.12 milestone Sep 28, 2021
@ghost ghost added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Sep 28, 2021
@zadjii-msft zadjii-msft self-assigned this Sep 28, 2021
@zadjii-msft
Copy link
Member Author

  • settings.baseLayerProfile = Profile::FromJson(defaultsObject); does find the opacity in the settings

Oh boy I bet it's this block

        _Opacity = appearance.HasOpacity() ?
                       appearance.Opacity() :
                       UseAcrylic() ?
                       .5 :
                       1.0;

@ghost ghost added the In-PR This issue has a related PR label Sep 28, 2021
@ghost ghost closed this as completed in #11363 Sep 29, 2021
ghost pushed a commit that referenced this issue Sep 29, 2021
)

This logic was seemingly redundant. There's two cases I'm looking at here:

#### Case 1
```jsonc
    "defaults":
    {
        "opacity": 35
    },
    "list":
    [
        {
            "commandline": "cmd.exe",
            "name": "Command Prompt"
        },
```

In this case, we wouldn't set the `TerminalSettings` Opacity to .35, we'd set it to 1.0, because the profile didn't have an `opactity`.

#### Case 2
```jsonc
    "defaults":
    {
        "useAcrylic": true
    },
    "list":
    [
        {
            "commandline": "cmd.exe",
            "name": "Command Prompt"
        },
```

In this case we still want to have an acrylic effect. Previously, we'd default this effect to 50% opaque. I'm not sure that we can actually get that anymore. BUT it turns out, we _can_ have 100% opacity and HostBackdropAcrylic. It is very subtle, but is maybe something we should be allowing anyways. It kinda looks like:
![image](https://user-images.githubusercontent.com/18356694/135168469-35d1f55b-58d1-4ee3-a717-76000c2574b9.png)



* [x] Fixes #11355
* [x] Regressed in #11180 
* [x] I work here
@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 Sep 29, 2021
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-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Priority-1 A description (P1) 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.

1 participant