Skip to content

Add more tool invocation actions

R. B. requested to merge (removed):tool-invocations into master

This merge request adds new tool invocation actions besides the line tool action:

  • Activate Ellipse Tool
  • Activate Rectangle Tool
  • Activate Move Tool
  • Activate Fill Tool
  • Activate Gradient Tool
  • Activate Measure Tool
  • Activate Elliptical Selection Tool
  • Activate Contiguous Selection Tool
  • Activate Freehand Selection Tool
  • Activate Rectangular Selection Tool

To-do:

  • Better structuring if possible (please let me know, there's a lot of if statements)
  • More tool actions (maybe all of them? Some of them might be a bit finnicky/unnecessary though)
  • Any suggestions that seem reasonable

Issues:

It's not currently possible to delete new tool invocation shortcuts made with these actions, but this is unrelated to the patch itself: It seems you can't currently delete a tool invocation shortcut if there's just one of that particular action. For example, if you have two Tool Invocations using the Confirm action, you can delete either of them but you can't delete whatever remains. To workaround this for now, just unset the shortcuts. I am not currently sure where these shortcuts are stored, as I don't see them in kritarc or kritashortcutsrc.

It seems that these tool invocations, along with the already existing Line tool invocation, only work with Mouse Button-type inputs. Neither Mouse Wheel nor Key Combination-type inputs work with these, but that's likely unrelated to the patch.

When using Breeze, Oxygen, or Windows styles, a lot of the actions don't fit cleanly into the action configuration dropdown. It would be out-of-scope for this patch to fix that, especially as this issue also affects other actions in unrelated canvas input groups.

Test Plan

Configure Krita -> Canvas Input Settings -> Tool Invocation -> Set a shortcut for a particular action -> Observe

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.
Edited by R. B.

Merge request reports