Skip to content

Add proper angle widgets (4.3)

Deif Lou requested to merge deiflou/krita:deiflou/add_angle_widget_4.3 into krita/4.3

This MR adds new angle widgets to choose angles:

test_angle_selector_02

The changes basically do the following:

  • add an angle gauge widget (a circular widget that allows to choose an angle) that:
    • can be changed with the keyboard (up/down/left/right keys), with the mouse wheel or the mouse (clicking and dragging around)
    • has snapping to multiples of a custom angle by using ctrl + up/down/left/right keys, ctrl + mouse wheel or by click and dragging close to the gauge
    • has a custom reseting angle that can be set by double clicking
  • add a generic angle selector widget that puts together the angle gauge to quickly choose an angle, a spin box to fine tune the value of the angle, and some options to flip the selected angle
  • put the angle selector in relevant places. The idea is to put it everywhere it is suitable

NOTE: I'll make a list of the relevant widgets where the angle selector could be put before making any changes, in case some of them need discussion. I'll make a commit for each of them. If anyone has suggestions for places where to put it, write here.

Places where to put the angle selector:

  • Filters
  • Generators
  • Dockers
    • Overview (image)
    • Artistic Color Selector (image)
  • Tool Options
    • Edit Shape Tool (Ellipses) (image)
    • Calligraphy (image)
    • Shape Tools (image)
      • Rectangle Tool
      • Ellipse Tool
      • Polygon Tool
      • Polyline Tool
      • Bezier Curve Tool (image)
      • Freehand Path Tool
    • Dynamic Brush Tool (image)
    • Multibrush Tool (image)
    • Fill Tool (image)
    • Bezier Curve Selection Tool (image)
  • Other
    • Status Bar (image)
    • Image->Rotate->Rotate Image... (image)
      • Layer->Transform->Rotate->Rotate Layer...
      • Layer->Transform All Layers->Rotate->Rotate All Layers...
    • Image->Shear Image... (image)
      • Layer->Transform->Shear Layer...
      • Layer->Transform All Layers->Shear All Layers...
    • Layer->Split->Clones Array... (image)
    • Layer->Layer Style... (image)
  • Brush Settings
    • Pixel Engine
      • General->Brush Tip->Auto->Angle (image)
      • General->Brush Tip->Predefined->Rotation (image)
      • Masked Brush->Brush Tip->Auto->Angle (image, same as general->brush tip)
      • Masked Brush->Brush Tip->Predefined->Rotation (image, same as general->brush tip)
    • Color Smudge Engine
      • General->Brush Tip->Auto->Angle (image, same as pixel engine)
      • General->Brush Tip->Predefined->Rotation (image, same as pixel engine)
    • Sketch Engine
      • General->Brush Tip->Auto->Angle (image, same as pixel engine)
      • General->Brush Tip->Predefined->Rotation (image, same as pixel engine)
    • Bristle Engine
      • General->Brush Tip->Auto->Angle (image, same as pixel engine)
      • General->Brush Tip->Predefined->Rotation (image, same as pixel engine)
    • Spray Engine
      • General->Spray Area->Angle (image)
      • General->Brush Tip->Auto->Angle (image, same as pixel engine)
      • General->Brush Tip->Predefined->Rotation (image, same as pixel engine)
      • General->Shape Dynamics->Fixed Rotation (image)
    • Hatching Engine
      • General->Brush Tip->Auto->Angle (image, same as pixel engine)
      • General->Brush Tip->Predefined->Rotation (image, same as pixel engine)
      • General->Hatching Options->Angle (image)
    • Clone Engine
      • General->Brush Tip->Auto->Angle (image, same as pixel engine)
      • General->Brush Tip->Predefined->Rotation (image, same as pixel engine)
    • Tangent Normal Engine
      • General->Brush Tip->Auto->Angle (image, same as pixel engine)
      • General->Brush Tip->Predefined->Rotation (image, same as pixel engine)
    • Deform Engine
      • General->Brush Size->Angle (image)
    • Filter Engine
      • General->Brush Tip->Auto->Angle (image, same as pixel engine)
      • General->Brush Tip->Predefined->Rotation (image, same as pixel engine)

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 Deif Lou

Merge request reports