Skip to content

Show gamut mask in the pop-up color selector

This merge request contains two interconnected little features:

  1. If a gamut mask is active, it is also shown in the on-canvas popup selector (default Shift+I).
  2. Activation state is synchronized across color selectors and their gamut masking toolbars.

Test Plan

Basic tests for both features:

Feature: gamut masks in the pop-up color selector

Background:

Given either advanced color selector or artistic color selector is open
And the advanced color selector shape is set to wheel

Scenario: pop-up selector with active mask

Given a gamut mask is selected and active
When the user brings up the pop-up color selector
Then the pop-up selector shows with the gamut mask applied

Scenario: pop-up selector with deactivated mask

Given a gamut mask is selected, but deactivated
When the users brings up the pop-up color selector
Then the pop-up selector shows all colors, without the mask

Feature: synchronized activation state of gamut mask

Background:

Given both advanced color selector and artistic color selector are open
And the advanced color selector shape is set to wheel

Scenario: gamut mask is deactivated in all selectors at the same time

Given a gamut mask is selected and active
When the user deactivates the mask in <color selector>
Then the advanced, artistic and pop-up color selectors do not show mask
And gamut mask toolbars in advanced and artistic selectors read 'mask is disabled'

Examples:
| color selector |
| advanced color selector |
| artistic color selector |

Scenario: gamut mask is reactivated in all selectors at the same time

Given a gamut mask is selected, but deactivated
When the user reactivates the mask in <color selector>
Then the advanced, artistic and pop-up color selectors activate the mask
And gamut mask toolbars in advanced and artistic selectors show the rotation slider

Examples:
| color selector |
| advanced color selector |
| artistic color selector |

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.

Merge request reports