Minor fixes to the HSV Color Picker
- Fixes Specific Color Picker docker from expanding when switching between HSV/RGB (BUG:453187)
- Removes code that sets the height of the color slider using a manual sizeHint, which is inaccurate and the size of components may rescale based on font changes
- Fixes bug where HSV color slider's hue resets to 0 when desaturated
- Recolors HSV color slider's V slider based on H and S values
- Changes the HSV color slider's internal representation HSV to fix V slider's saturation
- Most likely visually imperceptible, but this ensures that the last value on the slider is the maxColor.
Test Plan
Commit 1:
- Open Specific Color Selector
- Pop it out so that it is floating
- Reduce it as small as it can be vertically
- Switch between HSV and RGB. It should not expand
- Before this patch, it expands
Commit 2-6
- Open Specific Color Selector
- Change to HSV mode
- Set H to 360
- Drag S and V sliders through their full range of motion
- H should not jump to 0
- Note that the V slider should now change color as well
Formalities Checklist
-
I confirmed this builds. -
I confirmed Krita ran and the relevant functions work. -
I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!) -
I made sure my commits build individually and have good descriptions as per KDE guidelines. -
I made sure my code conforms to the standards set in the HACKING file. -
I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Sam Linnfer