As I mentioned in https://github.com/microsoft/terminal/issues/3322#issuecomment-546391285, we've been dancing around the idea of "XAML theming" for a while in a bunch of issues, but never had one place to track all the requested functionality. This will serve as the master thread for those requests.
It looks to me like we've danced around the idea in #1963, #1337, #3061/#3062, #2994, but never had a comprehensive answer.
Ideally, these are something that's more powerful than just setting the "color scheme". This would control sizing, coloration of UI elements of the app itself, not just the colors of the terminal _contents_. Consider things like themes in VsCode, Sublime Text, where there are _schemes_ that can control the colorization of the buffer, and themes that can change the appearance of the app itself.
UI elements to be able to control:
compact, default, and touch friendly tab row sizes Other ideas:
cursorColor = yellow) (#7522)Currently we don't have all that many UI elements, but in a hypothetical world with a command palette (#2046) and a search box (#605), there'll be even more UI elements to be able to control.
I know @cinnamon-msft had some mockups of "themes".
I imagine that these would be something that would be easier to control with XAML resources somehow, though I'm not sure how technically possible it would be to have the user specify a XAML file and have us load it into our resources at runtime. But that might be an option to pursue as an alternative to adding tons of new settings that will need to be parsed and applied manually at runtime.
Potential solution design:
This is a real showerthought of a design, which needs real spec'ing, but here's what I came up with this (06 Dec 2019) morning
{
"applicationTheme": "My Boxy Theme",
"themes": [
{
"name": "My Boxy Theme",
"requestedTheme": "dark",
"tab.radius": 0,
"tab.padding": 5,
"tab.background": "terminalBackground",
"tab.textColor": "key:SystemAccentColorLight3",
"tab.icon": "monochrome",
"tab.closeButton": "hidden",
"tabRow.background": "accent",
"tabRow.shadows": false
},
{
"name": "My small light theme",
"tabBackground": "#80ff0000",
"tabRowBackground": "#ffffffff",
"tabHeight": 16,
"requestedTheme": "light",
"colorSheme": "Solarized Light",
"tabIcon": "hidden",
"tabCloseButton": "hover"
}
]
}
I've given both a tab.<property> and a tab<Property> style here, for comparison. Unsure of which is better.
Colors can be one of:
#aarrggbb coloraccent for the accent colorterminalBackground to use the default background color of the focused terminalterminalForeground to use the default foreground color of the focused terminalkey:SomeXamlKey to try and look SomeXamlKey up from our resources as a Color, and use that color for the value.accent just key:SystemAccentColor?Then we have a bunch of UI settings.
We'll use these settings to set XAML resource values, like the TabViewBackground. Then, when they change, the UI should just respond to these values changing right?
For hot-reloading settings - does updating resources in xaml auto-relayout things?
For "tabBackground": "terminalBackground", does changing the default background color from within the terminal automatically update this color for UI elements? (hopefully).
This design doesn't really have both light and dark variants, instead just sets a system theme it wants. What if the theme specifies system? could it support light and dark versions somehow?
With the tab color picker that sets tab colors, how does that interact with this? We probably don't actually want the color to apply to the whole tab itself, we probably just want an overline. If we have an overline, people probably what to be able to set it. Manually setting the color with the menu should just be an override - "tabColorOverride", so that a settings reload doesn't blow it away. Presumably, there's a way to set the background color of a tab manually to override that of the theme - thet's probably how that PR works today.
How would we make sure that "tab.background": "terminalBackground" works with manually overriding the tab color?
Not sure if this task is just talking about extending the theme flexibility but my feature-request may be related... https://github.com/microsoft/terminal/issues/3687 ?
Perhaps you could allow the importing of a ResourceDictionary - or a JSON which gets translated into a valid Xaml ResourceDictonary ingested on app startup.
Hey, @zadjii-msft ,
just some thoughts about this, I hope you don't mind:
"tabBackground": "terminalBackground" - I'm not sure that I understand, but since tabs and the background use different resources, don't think so (except where the tab is deselected. Then the transparent brush is used to draw the tab).Those are just my thoughts, how exactly would it end up is your call, of course.
As a start, could the tab background be calculated based on the background setting of the theme? That would already help by not having that jarring #000 there.
When can we have this feature released?
When it's done being developed.
This could be a really good start, Chrome OS Terminal now colors the tab by the background color

Coming from #7363 , the acrylic setting should extend into the tab space.
When acrylic is enabled, the tab color (which is currently never acrylic) becomes inconsistent with the background (where acrylic is applied).
See below - it appears, at a glance, that the first tab is active, because the color is a close match to the acrylic average. But in reality, the black tab in the middle is active.

@mikemaccana ahhhhh, okay I think I'm getting it better now (with more coffee). What you're _really_ looking for is the #702/#3774 subset of this issue. The spec over at #5772 covers this as "tab.background": "terminalBackground", so the tab color will automatically match the terminal's background brush (including acrylic).
I leave this here as a reference: Fluent XAML Theme Editor
@zadjii-msft missed this back in August, but yes exactly! Thanks. 馃檪
Most helpful comment
This could be a really good start, Chrome OS Terminal now colors the tab by the background color
https://www.androidpolice.com/2020/04/04/hack-the-planet-in-style-with-the-new-linux-terminal-in-chrome-os-83/