Add support for changing the active color scheme with an action#6993
Merged
9 commits merged intomasterfrom Aug 10, 2020
Merged
Conversation
…etColorScheme # Conflicts: # src/cascadia/TerminalApp/ColorScheme.h
miniksa
reviewed
Aug 6, 2020
miniksa
approved these changes
Aug 6, 2020
DHowett
reviewed
Aug 6, 2020
DHowett
reviewed
Aug 6, 2020
…etColorScheme # Conflicts: # src/cascadia/TerminalControl/TermControl.idl
carlos-zamora
requested changes
Aug 7, 2020
Member
carlos-zamora
left a comment
There was a problem hiding this comment.
- Update docs
- What happens when the user misspells the scheme name?
- Right now, it looks like you go all the way down to
CascadiaSettings::ApplyColorSchemeand 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
Member
Author
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. |
Member
Author
|
@carlos-zamora Docs PR: MicrosoftDocs/terminal#105 |
carlos-zamora
approved these changes
Aug 7, 2020
…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: |
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Adds the
setColorSchemeaction, to change the color scheme of the active control to one given by thenameparameter.nameis required. Ifnameis 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
TerminalSettingsof 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