Rework rectangle/arrow key handling to avoid "stuck edges" and 0x0px rectangle
Summary:
Rewritten rectangle/arrow key movement & resizing functionality.
Eliminates problem where rectangle edges were resized to touch a screen edge but could not be sized back.
Also halts resizing at 20x20px - matches minimum size when mouse is clicked to begin selection.
Test Plan:
- Download patch & apply to Spectacle
- Begin a rectangular selection by dragging a rectangle with the mouse
- Use Arrows keys to move rectangle to various screen edges
- Use Alt + Arrow to ensure rectangle edge releases from screen edge
- Use Alt + Arrow and attempt to make the smallest rectangle possible It shold stop at 20x20px and not get any smaller
Reviewers: rkflx, ngraham, Spectacle
Reviewed By: rkflx, Spectacle
Differential Revision: https://phabricator.kde.org/D14252