Adds colored sliders to HSV adjustment filter
What it does
Improves the QSliders in the HSV adjustment filter widget with colored sliders.
Hue slider scrolls as you click in relative mode, other sliders do not change color, serving as an aesthetic indicator only.
(before this change)
Reasons to make this change
- The QSlider is hard to click - Clicking on the QSlider only moves by one step, instead of moving directly to the position
- Having a visual indicator of the color is extremely helpful for the Colorize mode.
- Even when not using the colorized mode, having a visual indication of where the hue can shift, as well as the saturation and values is useful. If the color in the image is green and you want to shift it to blue, then having the color slider show you that blue is right of green means you can just move it directly to the right and you won’t need to guess.
- The colors on the sliders do not change when using the relative mode (a la Photoshop), and serves as an aesthetic visual indicator
- Improves existing code in
KisHsvColorAdjustmentWidget
, makes it easy to implement additional color pickers for HSX - Community feedback is fairly positive, despite the initial misunderstanding.
- More familiar UI for PhotoShop users
Dependencies
Depends on changes made in !1436 (merged)
Commits
- Commit 1: Refactors
KisHsvColorAdjustmentWidget
- improves code quality, UI layout - Commit 2: Adds support for negative minimum values to
KisHsvColorSlider
- Commit 3: Adds HSX mixing modes to
KisHsvColorSlider
- Commit 4: Updates
KisHsvAdjustmentWidget
to use colored sliders - Commit 5: Simplifies code in
KisHsvColorInput
- Commit 6: Scrolls the Hue bar when clicked in relative mode
- Commit 7: Fixes the Saturation mixing as identified by emmet
Test Plan
-
Open a new file
-
Open Filters -> Adjust HSV (Ctrl-U)
-
Verify that the sliders have been replaced with colored sliders
-
Stretch the UI to ensure it reflows correctly
-
For each mode in
- Hue/Saturation/Value (HSV)
- Hue/Saturation/Lightness (HSL)
- Hue/Saturation/Intensity (HSI)
- Hue/Saturation/Luma (HSY')
- Blue Chroma/Red Chroma/Luma (CrCbY)
-
Test the three sliders through their full range of motion For HSV/HSL/HSI/HSY': ±180, ±100, ±100
For CrCbY: ±100, ±100, ±100
-
Ticking colorise should auto-rescale the values.
For HSV/HSL/HSI/HSY': 0-360, 0-100, -100-100
For CrCbY: 0-100, 0-100, -100-100
-
Applying each filter should result in the correct transformation
-
Applying and editing each HSV adjustment filter mask should also display the new UI
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.