Add nullable colors to settings UI #17870
Open
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 some pre-existing settings ($profile.foreground, $profile.background, $profile.selectionBackground, $profile.cursorColor) to the settings UI. This was accomplished by introducing a new control: NullableColorPicker. This control allows the user to pick a color from the color scheme, set the color to null, and select a color from an advanced color picker.
References and Relevant Issues
#10000
Detailed Description of the Pull Request / Additional comments
ExpanderSettingContainerStyle
to allow for a custom preview template. This way, we can display the current value in the expander and we're not just limited to text.CurrentValue
property fromString
toIInspectable
CurrentValueTemplate
property to control how to display the current valueBooleanToVisibility
,ColorToString
,ColorToBrush
)NameWithHexCode
toColorTableEntry
to expose a color asRed #RRGGBB
(used for tooltips and a11y)ForegroundPreview
(and equivalent for other colors) to AppearanceViewModel to deduce the color that will be usedValidation Steps Performed
Follow-ups