Open
Description
openedon Dec 21, 2020
Describe the problem this feature would solve
Roll-up of all feature additions and changes needed for the next version of the ColorPickerButton.
Original PR #3379
Original Issue #3363
Features / Refactoring
- [Cancelled]
Add a recent colors palette / listIt may make sense to show this in place of the accent colors and the preview color (there isn't space for both). The recent color list will always show the currently selected color first anyway. At this point an enum for preview display modes may make more sense than a lot of mutually exclusive properties: 1.PreviewColor
, 2.PreviewAndAccentColors
3.RecentColors
- [Cancelled]
Add an Eyedropper button to select an existing color in the app. Integrate with the recent colors list. Follow ColorPickerUXThe recent colors will likely be horizontal instead of vertical and replacing the standard preview and accent colorsThe eyedropper will be shown to the left of the recent colors list (nearest the currently selected color)
- Add property to hide the accent colors to show only the preview color
- [Cancelled]
Address todo items from initial PR here:The mini selected color palette may follow the Windows accent color lighter/darker shades algorithm. However, the implementation of this algorithm is currently unknown. This algorithm may be in the XAML fluent theme editor: https://github.com/microsoft/fluent-xaml-theme-editorAlgorithm is unknown and likely will never be public. I'm dropping this change from consideration until/if the situation changes.Move localizable strings into resourcesTreat negative/zero numbers in CustomPaletteColumnCount as 'auto' and automatically calculate a good column count to keep rows/columns even (square root rounded up to the nearest int). Set the default of this property to 0 'auto'.
- [Cancelled]
Complete the ColorPickerSlider as a stand-alone control. Use binding to link it with the ColorPicker/ColorPickerButton. This simplifies the template and removes the remaining unwanted template parts. - Combine all property changed callbacks into one to simplify things [From discord discussion] Closed in Color picker fixes #4134
- Use a corner radius of 4 to match WinUI 2.6 styles
- Switch to using NumberBox for color channel inputs
- Add back drop shadow behind preview color
- Make accent colors work in HSV to avoid colors getting stuck in black/white. Will fix ColorPicker Bottom Shade Adjuster Resets Color to White #4208.
Bugs
- There seems to be a visual bug in slider background rendering in some edge cases. This is a result of fixing some components to max in cases they probably shouldn't be.
- Set default Brush values in the XAML default style instead of when registering the DP. This is necessary to ensure a reference isn't shared across instances or threads. [From discord discussion] Closed in Color picker fixes #4134
- DPI changes do not trigger redrawing checkered background or slider gradients. This causes them to be blurry. Must listen for DPI changes and then re-render the backgrounds. [From discord discussion]
If I missed anything feel free to add in the comments below!
Additional context & Screenshots
- Recent colors list / eyedropper concept comes from ColorPickerUX discussed here in winui repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment