Flameshot was unable to start new captures after saving with
Ctrl+s while having a text area active from the Text tool.
This was caused by the overloaded call to close() which
was deleting the text area instead of closing the capture
and the consequent call of the destructor. That caused an
always active capture session.
normalize only swaps the sides if width() or height() is < 0,
but we need it to happen when it is <=0 because with QRect's
normalized method we get negative geometry and that causes a bug
when we position the buttons.
closes#11
Add an initial version of the text tool.
This commit adds:
- Basic text tool.
- On demand thickness and color update.
- Generalized logic for future widget based tools.
The core now has a method requestCapture, which receives a
CaptureRequest object with all the needed information.
This reduces code duplication in future features.
New improved selection code:
- Selection decopuled into a new class
- When you drag the selection against the limits it won't become
permanently smaller, it will "bounce" trying to recover its size.
If you drop it again it will adapt its size to the borders of the
screen.
- Fixed bugs in the button position algorithm.
- Implemented selection animations for future implementations.
The side panel opens with the Space key, this panel can contain
widgets to assist the capture with more features.
This commit fixes the preview of the tool hiding it when the
mouse hovers a widget. This is more needed now having a new widget
inside the CaptureWidget.
More flexible tool API
Minor code format fixes
Clipboard freeze fixed(?)
Arrow correcly growing close to the start point
Improve maintainability
Add undo/redo stack