-
Notifications
You must be signed in to change notification settings - Fork 206
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
Static color sliders / field #6111
Static color sliders / field #6111
Conversation
dd5aad0
to
0009f0e
Compare
Based on offline conversations, I've pushed a few new commits today. I changed the name of the variables to be variations on I also changed the wording in the settings menu to be "Sliders / Dynamic Backgrounds" for the same reason. And lastly, I changed the default style to be dynamic instead of static. That's based on some user polling that favored the dynamic style. Ready for a new look! |
0009f0e
to
8f07f35
Compare
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.
Thanks Eric! A couple of nitpicky thoughts inline, but otherwise this is looking pretty good to me.
"/Dynamic Backgrounds", | ||
{ | ||
"command": Gaffer.WeakMethod( self.setDynamicSliderBackgrounds ), | ||
"checkBox": self.getDynamicSliderBackgrounds(), |
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.
Could be worth adding a "description"
here to provide a short tooltip explaining the behaviour.
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.
Done in 7e709db.
Though I'm not super happy with the cosmetic formatting of that solution. I couldn't find a way to get it formatted better / independently of the source line layout the way the plug tooltips do.
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.
To match the more flexible formatting of the plug tooltips, we'd likely need a GafferUI.DocumentationAlgo.markdownToHTML( action.statusTip() )
here :
gaffer/python/GafferUI/Menu.py
Line 729 in 05aef9e
QtWidgets.QToolTip.showText( qEvent.globalPos(), action.statusTip(), self ) |
But that could start doing undesirable things in tooltips elsewhere such as wrapping file paths and the like, so I'd avoid that for now.
If you're unhappy with the current text, we could simplify this down to something more along the lines of :
"Dynamic backgrounds show the color that will result from moving the indicator to a given position."
Feel free to make a call on that while you squash everything down ready for merging. Thanks!
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.
I just went with the original text I had, I think it's a better explanation and not worth worrying over the formatting.
8f07f35
to
7e709db
Compare
Pushed a few new commits to address the comments above. I think except for the API naming we should be in good shape. |
7e709db
to
ec79d5b
Compare
Thanks Murray! Squashed down and verified everything matches up to the pre-squash state. Merging |
This adds the option to set the color sliders and field to dynamically update. In dynamic mode, which is how they have been thus far, the sliders show the color you will get if you move the indicator to the position at that color. They update as you change other channels.
The default mode is now non-dynamic.
With dynamic mode turned off, the slider shows the pure 0-1 (-1 to 1 for temperature and magenta) range for that channel only. So the red slider will always go from black to fully red, and similar for the other colors. The only exception is the saturation slider and the color field when the static component is set to hue. These will still update because they depend on the hue to show their full range.
With dynamic mode off, we can also optimize when we calculate the gradients and field so they don' t update as often. Not updating the gradient gives about a 90% speedup which does feel a little snappier when dragging the sliders.
Checklist