Rework rectangle/arrow key handling to avoid "stuck edges" and 0x0px rectangle

Authored by sharvey on Jul 25 2018, 2:28 AM.

Description

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

Details

Committed
sharveyJul 25 2018, 12:18 PM
Reviewer
Spectacle
Differential Revision
D14252: Rework rectangle/arrow key handling to avoid "stuck edges" and 0x0px rectangle
Parents
R166:68487fd0ca01: Add license header to TextLabel.qml
Branches
Unknown
Tags
Unknown