Skip to content

Bug:340643 grid brush offset shortcut

Creates a shortcut where if you press ctrl+alt+drag you will change the offset of the current grid brush. The new grid offset will be centered based on the mouse position at mouse release.

The struct KisGridProperties was also merged with KisGridOpProperties as discussed with Dmitriy to allow the grid shape to be available to the brush outline. KisGridProperties was also a legacy artifact and was meant to be deprecated anyway.

Also fixed two issues:

  1. When the grid offset would be large the drawn cell would be drawn almost entirely ( or entirely at 50%) outside the brush outline
  2. The offset would appear as 25% of the previously set offset when re-opening the brush settings

CC Bug:340641

Test Plan

Choose any grid brush and while on the canvas press ctrl+alt+drag to change the grid offset

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.

TODO

  • When the grid offset shortcut is active a grid similar to what is shown with the grid docker should temporarily appear to assist in choosing the offset
  • Grid offset shortcut outline should be the same shape type as the brush
Edited by reinold rojas

Merge request reports

Loading