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

Tab background should use opacity from profile #14833

Open
mosterme opened this issue Feb 12, 2023 · 3 comments
Open

Tab background should use opacity from profile #14833

mosterme opened this issue Feb 12, 2023 · 3 comments
Labels
Area-Theming Anything related to the theming of elements of the window Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Milestone

Comments

@mosterme
Copy link

mosterme commented Feb 12, 2023

The tab background color is picked from the current profile, but the opacity is not.
Which makes the tabs appear even darker than the actual tab contents.

terminal-1 terminal-2

Light theme and GitBash on Solarized Dark with 70 opacity and useAcrylic.
Windows-Terminal Version: 1.16.10262.0

Setting RGBA color values for tab colors in themes already works.
But then you lose the color hue from the current profile.

Hovering over an inactive tab comes close to the expected result.

terminal-3

This is somewhat related to #14026 and #14815.

@mosterme mosterme added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Feb 12, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot 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 Feb 12, 2023
@carlos-zamora carlos-zamora added Product-Terminal The new Windows Terminal. Area-Theming Anything related to the theming of elements of the window and removed 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 Feb 13, 2023
@carlos-zamora carlos-zamora added this to the Backlog milestone Feb 13, 2023
@zadjii-msft
Copy link
Member

Huh, why doesn't this work?

PERHAPS

if (const auto themeBrush{ tab->_themeColor.Evaluate(Application::Current().Resources(), terminalBrush, false) })
{
    // ThemeColor.Evaluate will get us a Brush (because the
    // TermControl could have an acrylic BG, for example). Take
    // that brush, and get the color out of it. We don't really
    // want to have the tab items themselves be acrylic.
    tab->_ApplyTabColorOnUIThread(til::color{ ThemeColor::ColorFromBrush(themeBrush) });
}

I wonder if we're setting the .Opacity on the brush, rather than the alpha, and doing the ThemeColor::Evaluate -> ColorFromBrush trip loses that Opacity that should really act as an alpha...

@mosterme
Copy link
Author

mosterme commented May 6, 2023

After looking at #15294, I tried testing out https://learn.microsoft.com/en-us/windows/terminal/customize-settings/themes again.

    "theme": "theme1",
    "themes": [
        {
            "name": "theme1",
            "tab":
            {
                "background": "terminalBackground"
            },
            "window":
            {
                "applicationTheme": "system"
            }
        }       
    ],
    "useAcrylicInTabRow": true,

This is the result. First tab is inactive, second tab is hovering over, third tab is the active one. Inactive tabs already look nicer now.

terminal-4

But the following sentences from the documentation make me doubt the desired result can currently be achieved with themes.

This color is always treated as a solid color, even if set to a terminalBackground of a pane with an acrylic background.

When set to terminalBackground or accent, this will automatically use an alpha value of 30%, to be semi-transparent.

@Anutrix
Copy link

Anutrix commented Apr 6, 2024

Not sure if this should be separate ticket but currently there's no way to set opacity of Tab-Row. Only acrylic blur is possible.
Terminal section itself has both opacity and acrylic settings but tab-row only has Acrylic Blur setting.

image
What if I want this part transparent?
See how I can read words behind terminal but there's block where you can't read anything.
Note that I am not taking about the tab titles but about the tab-row behind it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Theming Anything related to the theming of elements of the window Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

4 participants