-
Notifications
You must be signed in to change notification settings - Fork 634
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
Dyn 4738 custom color picker #13794
Dyn 4738 custom color picker #13794
Conversation
First version of the customized ColorPicker so it can be used in GroupStyles and in Color Palette node.
CustomColorPicker fixed to use only the Basic Colors and hide the Custom Colors. First changes for integrating color picker in Color Palette node.
Adapting the CustomColorPicker to be used in the Color Palette node.
Refactoring some code and adding comments.
From the GIF I see that there is considerable lag when you open the color picker for the first time, is it because you are in Debug, or is it usual? |
@RobertGlobant20 looks like we're missing the "Advanced" section that allows users to select and specify their own color in full RGB space. Not having this would be a pretty significant downgrade on existing ability to select colors. |
@RobertGlobant20 we should also update the style of the base node here too, as the border and dropdown are of the old style.
CC @Jingyi-Wen |
@Amoursol The advanced section will be part of the next Jira task, right now that section is hidden (we decide it to do it in a different task due that is a complete different window with different style). |
|
src/DynamoCoreWpf/UI/Converters.cs
Outdated
@@ -3641,4 +3641,60 @@ private double GetRelativeLuminance(System.Windows.Media.Color color) | |||
return 0.2126 * R + 0.7152 * G + 0.0722 * B; | |||
} | |||
} | |||
|
|||
/// <summary> | |||
/// This converter is used to add margin/Padding from Popup in the CustomColorPicker |
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.
add margin/Padding and return the added value?
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.
@QilongTang the comment was updated in the next commit: a49d970
@zeusongit |
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.
LGTM with comments
Adding comments
Once the last comment addressed, good to go. @RobertGlobant20 Please also manul test adding group styles locally to see if the data in settings file is in a consistent format. |
Reverting code added for debugging.
@QilongTang here is a GIF of how the GroupStyles are serialized in DynamoSettings.xml file. |
* DYN-4738-Custom-ColorPicker First version of the customized ColorPicker so it can be used in GroupStyles and in Color Palette node. * DYN-4738-Custom-ColorPicker CustomColorPicker fixed to use only the Basic Colors and hide the Custom Colors. First changes for integrating color picker in Color Palette node. * DYN-4738-Custom-ColorPicker Adapting the CustomColorPicker to be used in the Color Palette node. * DYN-4738-Custom-ColorPicker Refactoring some code and adding comments. * DYN-4738-Custom-ColorPicker Code Review1 Adding comments * DYN-4738-Custom-ColorPicker Code Review2 Reverting code added for debugging.
* DYN-4738-Custom-ColorPicker First version of the customized ColorPicker so it can be used in GroupStyles and in Color Palette node. * DYN-4738-Custom-ColorPicker CustomColorPicker fixed to use only the Basic Colors and hide the Custom Colors. First changes for integrating color picker in Color Palette node. * DYN-4738-Custom-ColorPicker Adapting the CustomColorPicker to be used in the Color Palette node. * DYN-4738-Custom-ColorPicker Refactoring some code and adding comments. * DYN-4738-Custom-ColorPicker Code Review1 Adding comments * DYN-4738-Custom-ColorPicker Code Review2 Reverting code added for debugging.
Purpose
Replacing the current ColorPicker and ColorPalette used for GroupStyles and for the Color Palette node.
Currently in Dynamo the GroupStyles are using the System.Windows.Forms.ColorDialog control for selecting the color and the Color Palette node is using the WPF Extended Toolkit ColorPicker, now with this change in both places we will be using the CustomColorPicker (based in WPF Extended Toolkit ColorPicker).
Basically I did the next tasks:
Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
Replacing the current ColorPicker and ColorPalette used for GroupStyles and for the Color Palette node.
Reviewers
@QilongTang
FYIs
@zeusongit