Skip to content

Add action shortcuts for configuring Flow, Fade, and Scatter

R. B. requested to merge tomtomtom/krita:tomtomtom/brushoptionactions into master

CCBUG: 435185

This merge request adds "increase/decrease setting" action shortcuts for brush options Flow, Fade, and Scatter strength, along with corresponding floating messages on use.

Stating the step values below; I'm not exactly the type of artist to be making use of these shortcuts (just a black-and-white comic artist) so I'm not quite sure what the most "ideal" increments would be, thus feedback and some testing would be appreciated:

  • "Increase Flow" and "Decrease Flow" change Flow by 10% unless the value is less than 40%, in which case they change by 5% instead, due to Flow control on the lower end requiring more granularity. Somewhat considering changing that threshold to 30% or 50%.
  • "Increase Fade" and "Decrease Fade" change Fade (both values) by 0.25. Somewhat considering changing that to .20 or .10. It should be kept in mind that Default and Gaussian mask are impacted by Fade differently. On use it also equalizes horizontal fade and vertical fade to the higher value of the two, but this may not necessarily be preferable over keeping the values divergent. Please let me know what you think.
  • "Increase Scatter" and "Decrease Scatter" change Scatter strength by 20%. Somewhat considering changing that to 10% or 25%. It should be kept in mind that Scatter strength can be affected by sensors.

This MR is technically ready for review but I think I'll let it sit in Draft state for a week or two in case someone wants to test it and give feedback.

Notes:

  • I'm not familiar with other programs so I'm not sure what the default shortcuts should be in the shortcut schemes.
  • There is only one setter and getter for Fade, with the setter setting both values (hfade and vfade) and the getter only getting the highest value between the two. It might be better to split up the functions into setting and getting hfade and vfade individually, but I think this is fine enough for the purpose of increasing/decreasing Fade with a single action, unless there's demand for shortcuts configuring hfade and vfade individually.
  • The floating messages aren't smart: They'll always provide a value (even if it's useless) and won't warn the user if the brush doesn't support Flow/Fade/Scatter.
  • The related values in the detached brush editor won't visually update while using these shortcuts due to https://bugs.kde.org/show_bug.cgi?id=435502 .

Test Plan

Attach these actions to shortcuts through the Keyboard Shortcut interface and use them, add them to the toolbar and use them, or activate them through the command bar (ctrl + enter).

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

Loading