-
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 changing the active color scheme with an action #6993
Conversation
…etColorScheme # Conflicts: # src/cascadia/TerminalApp/ColorScheme.h
…etColorScheme # Conflicts: # src/cascadia/TerminalControl/TermControl.idl
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.
- Update docs
- What happens when the user misspells the scheme name?
- Right now, it looks like you go all the way down to
CascadiaSettings::ApplyColorScheme
and just don't apply the scheme. - (Option 1) Should we have some sort of validation/warning? Then we prevent adding a dead keybinding. (this is my preferred route)
- (Option 2) Should we mark this keybinding as un-handled, and pass the key event straight to the terminal? (this might be a fine way to handle it if option 1 is too much work? But I still think we should do option 1)
- Right now, it looks like you go all the way down to
I don't think the validation code can really handle that right now - I'll file a follow up for now. I will do the "don't mark it as handled" thing now. |
@carlos-zamora Docs PR: MicrosoftDocs/terminal#105 |
…etColorScheme # Conflicts: # src/cascadia/TerminalApp/ActionAndArgs.cpp # src/cascadia/TerminalControl/TermControl.cpp
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
Summary of the Pull Request
Adds the
setColorScheme
action, to change the color scheme of the active control to one given by thename
parameter.name
is required. Ifname
is not the name of a color scheme, the action does nothing.References
PR Checklist
Detailed Description of the Pull Request / Additional comments
Technically, the action is being done by changing the settings of the current
TerminalSettings
of theTermControl
. Frankly, it should be operating on a copy of theTermControl
'sIControlSettings
, then updating the control's settings, or the Control should just listen for changes to it's setting's properties, and update in real time (without a manual call toUpdateSettings
. However, both those paths are somewhere unknowable beyond #6904, so we'll just do this for now.Validation Steps Performed