Bug 371843

Summary: selection rectangle can be too tiny which causes it to become buggy
Product: [Applications] Spectacle Reporter: . <dev.rindeal+bugs.kde.org>
Component: GeneralAssignee: Leon De Andrade <leondeandrade>
Status: RESOLVED FIXED    
Severity: normal CC: leondeandrade, nate, peter
Priority: NOR Keywords: junior-jobs, usability
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 19.12.0
Sentry Crash Report:

Description . 2016-10-29 19:58:30 UTC
Steps to reproduce:

1. select "Rectangular Region" area
2. click "Take a New Screenshot"
3. click somewhere and slightly drag the cursor to create a tiny rectangle

Actual results:

A special rectangle is now created. Features of this rectangle:

 - it cannot be resized vertically
 - resizing handles are not displayed (those blue semicircles)

Expected results:

It shouldn't be possible to create a rectangle smaller than some sane predefined size.
Comment 1 Peter Wu 2016-11-02 23:55:37 UTC
The resize handles are deliberately not shown when the box becomes too small.

Not being able to resize vertically is a bit odd, I can confirm this: create a small rectangle, resize is to make it much wider. Observe that vertical resizing does not work however.

Workaround: just create a new selection (this is what I normally do when I accidentally create a too small selection).
Comment 2 Nate Graham 2018-10-20 14:07:52 UTC
Still valid. When the box is tiny, we should show the resize handles on the *outside* if at all possible, and adjust the drag areas so they can be used.
Comment 3 Leon De Andrade 2019-08-21 17:13:33 UTC
Possible fix, needs review: 
https://phabricator.kde.org/D23322
Comment 4 Nate Graham 2019-08-23 13:29:33 UTC
Git commit 2c176d82e012e81dbbfc931d302890ef78d1c614 by Nate Graham, on behalf of Leon De Andrade.
Committed on 23/08/2019 at 13:29.
Pushed by ngraham into branch 'master'.

Add new touch-friendly drag handlers

Summary:
Added new drag Handlers for the rectangular region option, which become free-floating) if there is not enough space (results in a bigger touch area for moving the rectangle) and are more touch-friendly.
FIXED-IN: 19.12.0

Test Plan:
Before:
- drag handles very small, not touch-friendly
- If rectangle to small: drag handles too close together (or just removed in the newest version? The screenshot are from Plasma 5.16) and moving rectangle is not possible anymore (as touch areas for resizing fill out the rectangle)
{F7267810} {F7267812}
After:
{F7267756} {F7267758} {F7270926}

Reviewers: #spectacle, #vdg, ngraham, davidre

Reviewed By: #spectacle, #vdg, ngraham, davidre

Subscribers: davidre, filipf, ngraham, #spectacle

Tags: #spectacle

Differential Revision: https://phabricator.kde.org/D23322

M  +132  -97   src/QuickEditor/QuickEditor.cpp
M  +13   -5    src/QuickEditor/QuickEditor.h

https://commits.kde.org/spectacle/2c176d82e012e81dbbfc931d302890ef78d1c614