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

UI Suggestion: Visually link tab to console view #702

Closed
mdtauk opened this issue May 11, 2019 · 16 comments · Fixed by #13178
Closed

UI Suggestion: Visually link tab to console view #702

mdtauk opened this issue May 11, 2019 · 16 comments · Fixed by #13178
Labels
Area-Theming Anything related to the theming of elements of the window Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@mdtauk
Copy link

mdtauk commented May 11, 2019

When work begins on polishing the user interface, it could be nice to make the tab and the console view feel connected, in a similar way to the teaser/trailer video shown at build tries to portray.

image

image

The window frame respects the app mode so Light or Dark. But each profile's tab, will match the customised settings.

@ghosty141
Copy link
Contributor

ghosty141 commented May 11, 2019

So I'm currently hacking around with this but I found one issue that most likely makes this kinda hard to implement: The tab bar is not using the acrylic effect (yet). This makes the opacity of the tab (thus the color) not match the rest of the window. But there is hope! They seem to have this on the radar, I found this comment:

https://github.com/microsoft/Terminal/blob/6088134832b851c553af791ee17a9b5c0d808385/src/cascadia/TerminalApp/App.cpp#L643-L644

Here is how I did it (acrylic needs to be off else it looks bad): ghosty141@2cc95d5

@mdtauk
Copy link
Author

mdtauk commented May 11, 2019

I believe it's using a XAML Island, but there are other surfaces that can use Acrylic, and I'm sure as WinRT's presentation platform becomes open source in WinUI 3.0 - this will become more possible.

But thinking about where the app is heading now, will hopefully drive things forward.

@ghosty141
Copy link
Contributor

ghosty141 commented May 11, 2019

@mdtauk What I'm saying is that changing the tab color "can" only be done once the tab bar is using the acrylic effect. One big problem is that the tabbar currently gets style according to the theme the user uses. The use of acrylic is done per profile while the tabbar exists only once. So unless the UI gets changed quite a bit, this will probably take a while.

@mdtauk
Copy link
Author

mdtauk commented May 11, 2019

Yea I get that, but the window itself is a Win32 window, so XAML acrylic brushes are a bit difficult.

The app would have to extend into the titlebar area and the window colour would need to be the Host Acrylic matching the RequestedTheme.

But yes, matching tab colour to the console is a start, and removing the tab background colour, and ensuring the inactive tabs show up well using ThemeResources

@DHowett-MSFT
Copy link
Contributor

Funny enough, the code @ghosty141 changed ("how to set a brush maybe?") is code I wrote when testing this exact feature.

If you get the actual brush from the background of the terminal control, you can copy the acrylic effect directly into the tab. Use the same acrylic setup as is in TerminalControl -- create a HostBackdropAcrylicBrush, give it a tint and opacity, and set that as the background brush.

Ideally, we'd be using a .xaml file and xaml "theme resources" instead of pushing brushes directly into controls at runtime. 😄

@mdtauk
Copy link
Author

mdtauk commented May 11, 2019

ThemeResources would automatically refresh upon the user setting the theme. Until Win32 gets official support, you'll have to redraw and detect the change

@zadjii-msft
Copy link
Member

I think this would be a really cool setting.

If someone wanted to to go ahead an implement this, they'd probably need to:

  • add a GetBackgroundBrush method to TermControl, in the .idl, .h and .cpp files.
  • Then when the control is focused (when the tab changes), you'd need to change the background of the tab to control's brush. When it's unfocused, you'd need to remove this brush (somehow).
  • Then, I'd add a setting to enable this feature, since not everyone's going to want their terminal to look this way. I'd make it a global setting, so see GlobalAppSettings. I'm okay defaulting this behavior to on, but if people have problems with that, we can discuss it on the PR :)

@ghosty141
Copy link
Contributor

@zadjii-msft Thanks for the help! I'm currently working on it and trying to get the changing of the background to work.

@miniksa
Copy link
Member

miniksa commented May 14, 2019

This is another department where @cinnamon-msft might want to weigh in on what this should look like relative to the design mockups we've already prepared.

@miniksa miniksa added the Area-User Interface Issues pertaining to the user interface of the Console or Terminal label May 14, 2019
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@miniksa miniksa added Product-Terminal The new Windows Terminal. Issue-Task It's a feature request, but it doesn't really need a major design. and removed Mass-Chaos labels May 17, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 17, 2019
@jamers99
Copy link

jamers99 commented Jul 2, 2019

Daaaanng i like that mockup. When is this coming to the version in the Store??

@zadjii-msft zadjii-msft added Area-Theming Anything related to the theming of elements of the window and removed Area-User Interface Issues pertaining to the user interface of the Console or Terminal labels Aug 4, 2021
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Aug 4, 2021
@AkazaRenn
Copy link

For those who enabled Acrylic effects, can we also have it on the active tab BG?

@ghost ghost added the In-PR This issue has a related PR label May 25, 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 Jul 7, 2022
zadjii-msft added a commit that referenced this issue Jul 7, 2022
## Summary of the Pull Request

Adds support for the `tab.background` property to themes. This is also a ThemeColor, so it accepts, colors, `accent`, and `terminalBackground`, just like everything else.

## References
* See #3327 
* ⚠️ targets #12992 ⚠️


## PR Checklist
* [x] Closes #702
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated - YUP

## Detailed Description of the Pull Request / Additional comments

I apparently left behing an optional color in TerminalTab for theme colors some time ago, just never used it. Crazy, huh?

## Validation Steps Performed

gifs below
@ghost
Copy link

ghost commented Sep 13, 2022

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

Handy links:

@Stanzilla
Copy link
Contributor

My only problem with the released version is that tabs do not support opacity or acrylic. Which makes it impossible to match the colors perfectly if your Terminal background does.

@zadjii-msft
Copy link
Member

zadjii-msft commented Sep 13, 2022

the released version is that tabs do not support opacity or acrylic

It's already in PR! #13935

@bendem
Copy link

bendem commented Sep 14, 2022

Handy links:

That's a dead link.

@zadjii-msft
Copy link
Member

That's a dead link.

Yea, we're sorting out some bot rules. It's been unhappy ever since we switched to two separate builds for the same "version". https://github.com/microsoft/terminal/releases/tag/v1.16.2523.0 is the right URL for now.

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-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements 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.

9 participants