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
This PR adds the ability to swap between dark and light icons for a profile based off your windows theme (Dark Theme or Light Theme).
This is an additive change so you can either keep using the string icon or you can now swap to an object form in which you specify a light property for light theme and dark for dark theme, e.g. for testing i used:
References and Relevant Issues
#15264
Detailed Description of the Pull Request / Additional comments
This PR adds a new type ProfileIcon with relevant IDL, then it edits the profile IDL to allow setting the field 'icon' to either this complex type ProfileIcon or the original string type to maintain compatability without breaking people.
I tried to utilize some form of union in MIDL but got very confused (I'm not actually sort I can use a union in MIDL3.0?) so i ended up with hacky if statements.
I also edited it so that when a theme change occurs on windows which triggers the
RefreshUIForSettingsReload
method, it will now call a new method called 'ResetEvaluated' that just resets the evaluated icon forcing a new lookup, this makes it so if you do a update the terminal tabs have updated icons.Validation Steps Performed
Used above profile and tested locally for a bit, appears to work quite well
PR Checklist