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

Support using different colors in the titlebar for focused/unfocused windows #4862

Closed
parml opened this issue Mar 10, 2020 · 13 comments · Fixed by #13049
Closed

Support using different colors in the titlebar for focused/unfocused windows #4862

parml opened this issue Mar 10, 2020 · 13 comments · Fixed by #13049
Labels
Area-Settings Issues related to settings and customizability, for console or terminal 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. 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

@parml
Copy link

parml commented Mar 10, 2020

Description of the new feature/enhancement

Context
When working on large monitors it is possible to have up to 6 windows in tiled mode. It is useful to know which one will pick up the keyboard actions without mouse or alt-tab hunting. For that it would be useful to have a different title bar color for the active window to distinguish it from all the other windows.

Solution on Windows
One can pick a color for the active window (HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM\AccentColor, say soft blue, can be done through settings)
and a color for inactive windows (HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM\AccentColorInactive, say light gray, in windows 10 can be done through regedit only)

Applications that work with the two values above: Windows Explorer, Registry Editor, Total Commander, Mozilla Firefox (default theme), Google Chrome (default theme).

Terminal seems to not work with the two values.

That may be at odds with the application identity. (The discontinued Microsoft Edge 44 used the same gray as a strong identity element, Microsoft Office programs also boldly state color identity and ignore AccentColorInactive, VSCode states identity as boldly, however it displays the titlebar in a different color when inactive).
Nevertheless, screens only get larger and the use-case described above is likely to become more common.

In terms of how to implement that for Terminal, which displays tabs on the title bar, Firefox has the solution of using the accent color on all inactive tabs and highlighting the active tab using a brighter color. Chrome does the same.

@parml parml added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Mar 10, 2020
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Mar 10, 2020
@zadjii-msft zadjii-msft changed the title Titlebar color. Use HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\DWM\ActiveColor Support using different colors in the titlebar for focused/unfocused windows Mar 10, 2020
@zadjii-msft zadjii-msft added 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. labels Mar 10, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Mar 10, 2020
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Mar 10, 2020
@zadjii-msft zadjii-msft removed the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Mar 10, 2020
@zadjii-msft
Copy link
Member

Thanks for the suggestion! I'm going to track this as a part of #3327, which is our megathread for adding even more customization to the Terminal. This request fits in nicely with a lot of the other work being done there.

@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Mar 13, 2020
@takahar
Copy link

takahar commented Apr 24, 2020

I think the active titlebar color was in effect when I am using WT without tab (setting: "globals":{"alwaysShowTabs":false, "showTabsInTitlebar": false} ), but it was with before than or equal to version 0.10 .
With 0.11, I cannot completely hide the tabs, so this issue is more important.

@DHowett-MSFT
Copy link
Contributor

I cannot completely hide the tabs

This behavior hasn't changed in 0.11, you're just running into the settings file changes we made. #5458 for more info.

@takahar
Copy link

takahar commented Apr 24, 2020

Thank you @DHowett-MSFT, I moved "globals" setting to root, and I got the original effect.
The titlebar color is in effect when with no tabs and tabs not in titlebar ("showTabsInTitlebar":false).
Instead, the titlebar color is not in effect when tabs in titlebar ("showTabsInTitlebar":true (this is the default)).

@plastikfan
Copy link

plastikfan commented Jun 3, 2020

I'm a new comer to Windows Terminal and have found it to be a revelation, especially when you combine being able to use beautiful fonts like Cascadia or Nerd Fonts. However, my heart sinks when I see that drab battleship grey for the title bar colour. What gets me is that there must have been an active decision to make it grey as opposed to leave it to the system default of using accent colours defined in systems settings.

Whilst issue #3327 is being considered for development, I would hope in the mean time we could see a simple stop-gap solution being applied where Terminal just uses the Accent colours as defined in system settings.

@Poopooracoocoo
Copy link

^yeah. #3327 is very different

@tveyben
Copy link

tveyben commented Jun 30, 2020

"…Microsoft Office programs also boldly state color identity and ignore AccentColorInactive…"

I have been googling for many hours trying to find a solution for making it possible to identify an active / in-active Office 365 application.
I am surprised of the lack of such basic functionality (it was possible in Win2k and likely even before that) to make it easy to identify which window actually have focus (hence gets the keyboard events).

This is totally of-topic for this Terminal-issue (sorry), but since we have the attention of some fine Microsoft engineers working on good stuff (linux) PLEASE let me know where to post this wish in the hopes that I can wake up who ever fell asleep in the "UX for beginners" class

@Poopooracoocoo
Copy link

Poopooracoocoo commented Aug 2, 2020

And Terminal's title bar elements don't dim when the window is inactive. Should I create an issue for this (if there isn't one already)?

@DHowett
Copy link
Member

DHowett commented Aug 2, 2020

That is tracked at the root of issue #1625. Thanks! 😄

@Poopooracoocoo
Copy link

this is actually just like #1963

@zadjii-msft
Copy link
Member

There's a subtle difference between this and #1963 - that one just wants to be able to set a custom titlebar color. This one wants to be able to set custom titlebar color when focused, and a different color when unfocused.

@zadjii-msft
Copy link
Member

note to self: The old colors in #12635 might be good candidates for the inactive window colors. We may be able to do that following the sameish steps as in #12632 (comment), without adding the rest of the theming settings.

@ghost ghost added the In-PR This issue has a related PR label May 6, 2022
@ghost ghost closed this as completed in #13049 Jul 7, 2022
ghost pushed a commit that referenced this issue Jul 7, 2022
Adds `tabRow.unfocusedBackground` to the theme properties.

When provided, the window will use this ThemeColor as the color of the tab row when the window is inactive. 

When omitted, the window will fall back to the default tab row color, `{"key": "TabViewBackground"}` from our App.xaml.

* [ ] tests added.
* [x] Closes #4862
* [ ] Needs a whole pile of docs updates, which we'll do at the end here.


This actually helped validate #12992 quite a bit. I found a bunch of bugs concerning null colors, null objects. Json parsing is hard 😛
@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
@ghost
Copy link

ghost commented Sep 13, 2022

🎉This issue was addressed in #13049, which has now been successfully released as Windows Terminal Preview v1.16.252.: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 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. 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.

8 participants