Skip to content

Add docker box toolbar widget

This splits the 'dockers in popup palette' widget out into its own class, KisDockerHud, and modifies it so it can be used by multiple widgets at once without conflict. The second widget added to make use of this is a toolbar action called "Docker Box". This lets any docker be added to the toolbar in a temporary popup widget similar to the "Choose brush preset" one in Painter's Tools.

Discussed in this thread: https://krita-artists.org/t/dockers-as-dropdown-menus/86289

This also fixes the dockerhud to show the first item in the list if the previously selected item was removed from the list. And somehow prevents a bug where closing a document while still having the Layers docker open in the Popup Palette, and then opening a document would cause Krita to crash.

Issues:

I'm not sure why the Wide Gamut Color Selector is so tall. Comparison of WGCS to Advanced Color Selector:

dockers-in-toolbar-color-selectors-fs8

The Toolbox is also oddly tall.

Test Plan

Add "Docker Box" to the toolbar, see that it borrows dockers correctly. Test that having the actual docker, the docker in the popup palette, and the docker in the toolbar all open at once shows the docker in the toolbar (since it is opened last), with messages in the others stating such.

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.

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.

Merge request reports