-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add support for per-profile tab colors #7162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey these are some obvious mistakes I made
// Color | | Set by | ||
// -------------------- | -- | -- | ||
// Runtime Color | _optional_ | Color Picker / `setTabColor` action | ||
// Control Tab Color | _optional_ | Profile's `tabColor`, or a color set by VT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"or a color set by VT"
Shouldn't this be in the line above with "Runtime Color"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh so I'm thinking that this operates more like the tab title, which can be set by VT, but the VT title can also be overridden temporarily at runtime the tab renamer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also note that I'm not sure that there is a VT sequence for setting the tab color, that's purely a hypothetical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also note that I'm not sure that there is a VT sequence for setting the tab color, that's purely a hypothetical
One could argue setting the title to a text string with a VT-sequence to set the background color could reasonably be interpreted as a request / intent to set the tab (or titlebar if tabs are disabled )color.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused about why TerminalSettings/Terminal/Core need to know the app-provided color. It seems like we're using TS as a go-between so two parts of TerminalApp can talk to eachother...
@DHowett and I discussed this and he's more okay with it now that we've considered the fact that the color needs to be associated with each individual control, not just per-tab. It's more like and extension of titlebar state:
etc. |
…rofile-tab-color-impl # Conflicts: # src/cascadia/UnitTests_TerminalCore/MockTermSettings.h
@@ -34,6 +34,8 @@ namespace Microsoft.Terminal.TerminalControl | |||
String WordDelimiters; | |||
|
|||
Boolean ForceVTInput; | |||
|
|||
Windows.Foundation.IReference<UInt32> TabColor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be an IControlSetting instead of an ICoreSetting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I was imagining this as just another thing that's similar to the title. If VT can modify the "title color" of the terminal, then that's something that's owned by the Core, not the control. It's the same way title "text" works now.
🎉 Handy links: |
Summary of the Pull Request
This PR adds support for per-profile tab colors, in accordance with #7134. This adds a single
tabColor
property, that when set, specifies the background color for profile's tab. This color can be overridden by the color picker, and clearing the color with the color picker will revert to this default color set for the tab.References
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed
Played with setting this color, both on launch and via hot-reload