Improve selection actions panel

SAP = selection actions panel

My changes:

  • Fix compilation for Qt 5.15, rename sabEnabled to sapEnabled, and fix spelling mistake (Orietation -> Orientation)
  • Replace position combobox with 8 buttons in a grid, with arrow icons
  • Replace behaviour combobox with radio button
  • Replace orientation combobox with radio button
  • Make the SAP stay on canvas and improve positioning so it stays anchored to a corner or a side
  • Keep the offset of SAP to the anchor between different selections and between launches of Krita
  • Add a bit of darkened or lightened background for the pin when it's in Fixed behaviour setting (otherwise it would not have any difference)
  • Switch orientation (Vertical/Horizontal) every time the user switches to a side (top/bottom/left/right) to the reasonable option (horizontal for top/bottom, vertical for left/right). It also resets the offset. It should not bother users too much and it should prevent some frustration.
  • Make the arrow buttons for position better by fading the icons when the buttons are disabled, and fading them a little bit when they are not the active position
  • Update SAP icons after theme change (in case the user changed it from dark to light etc.)
  • Update color palette in KisDisplayColorConverter on changing the theme (as above)

Videos: https://krita-artists.org/t/discussion-for-changes-to-new-feature-selection-actions-bar/178071/75?u=tiar

Luna's changes:

  • Everything from MR !2780 (closed)
  • Add pin to SAP to pin or unpin the SAP, pinning = setting the behaviour to Fixed so it sticks to the edge/corner of the widget instead of free floating

Test Plan

Just go to settings for the selection actions panel and edit it and see that it works.

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