[This patch is a work in progress. Any feedback is appreciated!]
They say you can't teach and old dog new tricks, and so I'm back to hacking Krita's color pickers to fix some things that bother me, to improve others, and to make things a bit more consistent across the various pickers.
- Feature: Holding `Shift` (technically `Ctrl+Shift` in the ctrl-picker) while picking colors enters "pure" mode, which temporarily bypasses things like radius and mixing. (Also addresses BUG:397889)
- I've slowed down and tuned the "resample" timing a bit while dragging the picker around the screen. This prevents sampling from happening too frequently and makes it easier to control color picker mixing. Tapping once still goes into effect instantly. (Not fully integrated with the Ctrl-Picker, as of now).
- Both main pickers (the dedicated "P" tool, as well as the ctrl-picker within kis_tool_paint) now share more code and work more consistently with eachother. There is still probably more that can be done on this front.
- Colors can now be picked from Reference Images with both the dedicated Color Picker Tool as well as the Ctrl-Picker. As of now, there are probably a few minor bugs.
- I've revamped the Color Picker's Tool Options widget. It looks a bit nicer and is a bit better organized.
- Some related behind-the-scenes code refactoring and reorganization. The growing number of color picker utility functions have been moved out of `KisToolUtils` into their own `KisPickerUtils` namespace in the same file.
- I've changed the Color Picker terminology from "blend" to "mix". "Mixing" is probably a better description of what's happening, and I think "blending" is too easy to confuse with other things, such as the painting technique as well as things like blend modes. This was a poor naming choice on my part from the beginning, and while I know this has the potential to cause confusion, I think it'll be better in the long run. (Sorry!) I'll also make sure to change this in the documentation before whenever this gets pushed.
There is still more to be done, but I wanted to share what I have so far.
Since the old palette-related options have been broken since the new Palette Docker merge, I've also prepared for some changes to those options. I've changed the "add to palette" option to reflect the new, modal design for the palette docker, which should now add to the currently active palette (unimplemented). I've also created a checkbox for "Snap to active palette", which is basically just a potential new location for the "Enforce palette colors" option that boud added to the general configuration a few weeks ago (also unimplemented).
Anyway, I'll be doing a little bit more work on this when I can, but if any of you test it out and have any thoughts or ideas, please let me know.
Thanks,
Emmet