The current annotation toolbar is not very flexible and can benefit from some modernization.
Some of the problems are:
- Custom toolbar UI not integrated with the other Qt toolbars
- Impossibility to change the color/font of the annotations on the fly (it is necessary to create a new tool with the desired color/font)
- Some tools are missing from the toolbar by default (e.g. squiggle underline, delete text, rectangle, ...)
- To keep an annotation tool selected one need to double click on an annotation (not intuitive/no tips for the user) (BUG: 358057)
- Incoherence between annotation icons used and one in config dialogs (BUG: 358065)
Note: This task has evolved from problems in the annotation configuration dialogs to usability problems in the annotation toolbar itself.
**To-do**
- [x] Select and use text annotations (highlighter, underline, squiggle, strike out)
- [x] Select and use note annotations (typewriter, inline note, popup note)
- [x] Select and use drawing annotations (freehand line, straight line, rectangle, ellipse, polygon)
- [ ] Select and use stamp annotation (see also T8074)
- [x] Pin annotation / The annotation remains selected after use if the pin button is checked
- [x] Change (outer) color and opacity of annotations [Draft code in place for now]
- [x] Change inner color and opacity of annotations
- [x] Change size of lines (freehand, straight line, geometrical shapes)
- [ ] Change icon of popup note
- [x] Change font of notes annotations (typewriter, inline note, popup note?)
- [ ] Change straight line line extensions
- [ ] Add mechanism to save annotation tools with custom options (favorite tools) See T8076#186855
- [ ] Use proper icons for all annotation
- [ ] Set width combo icons (generate programatically see D21364#469241)
- [ ] Activate line width action in one click (not just clicking on the down arrow)
- [ ] Set default location of annotation toolbar under the main toolbar
- [ ] Show/hide toolbar from menu
- [ ] Set meaningful default shortcuts for implicit and/or explicit tools
- [x] Reimplement code to enable/disable tools or text tools if document not editable
- [ ] Remove legacy code left hanging around after the changes
- [ ] Update documentation
- [ ] Properly manage the upgrade of the configuration file during the upgrade of okular (in particular the `AnnotationTools` key).
~~Most of the annotation configuration dialogs have misaligned label and unuseful group boxes.~~
~~Popup note:~~
~~- Remove "Icon" group box and make it a row in the grid layout~~
~~- Preview image under combo box~~
~~Inline note:~~
~~- Align 3 bottom labels on the right~~
~~- Align 2 top and 3 bottom labels~~
~~Freehand line:~~
~~- Remove "Style" group box~~
~~- Make size an entry in the grid~~
~~Straight line:~~
~~- Remove group boxes~~
~~Polygon:~~
~~- Remove group boxes~~
~~- Split inner color config in: Enabled check box + Color picker (in 2 lines)~~
~~Geometrical shape:~~
~~- Split inner color config in: Enabled check box + Color picker (in 2 lines)~~
~~Stamp:~~
~~- Remove group box~~