Buttons to toggle docker states, with (reused) icons

This adds KisActions for every docker, with icons. The icons are (mostly) reused, but I tried to do it creatively. (There is 41 dockers in total, btw... )

I wonder if it would be possible to get custom icons for every docker, or at least for all the most important ones + all the color selectors? Zrzut_ekranu_z_2025-06-26_03-48-28

Video link: https://krita-artists.org/uploads/default/original/3X/6/5/659653b4de065d81c9432b60c2645cdbd1c6410d.webm

This implements this feature request (10 votes in 10 hours, so I guess people seem to like it): https://krita-artists.org/t/docker-buttons-on-the-toolbar/127735 and also this one: https://krita-artists.org/t/show-dockers-in-the-search-command-search-actions/67194


Potentially, if we had custom icons, we could have docker tabs with icons for advanced users. It would require a bit of a hack but not too bad: https://github.com/drawpile/Drawpile/commit/a6519c6b3f Likewise bringing a docker to the top/activating the tab they're on (so it's not hidden just after the activation by the user) will be easier after this change, since I can do this in the new ToggleDockerAction. The hack for that is here: https://github.com/drawpile/Drawpile/commit/bc3a08f52d

Test Plan

  1. Go to Settings -> Configure Toolbars.
  2. Write "docker" into the search bar.
  3. Choose some dockers, add them to the Toolbar. In particular, add the Tool Options docker, because it's special.
  4. Test whether the buttons' state corresponds to whether the docker is open or not.
  5. Close Krita, restart, see whether the button states are correct.
  6. Change Tool Options between being a docker and the toolbar thingy, test if it works. (It should, since it requires a restart anyway).

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.
  • Does the patch add a user-visible feature? If yes, is there a documentation MR ready for it at Krita Documentation Repository?

Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build. If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.

Edited by Agata Cacko

Merge request reports

Loading