Skip to content

Add SelectionTool, SelectionHandle, SelectionBackground, CropBackground, RectangleCutout

Noah Davis requested to merge work/ndavis/croptool into master

Needed for graphics/koko!88 (merged)

It requires too much code and careful testing to change ResizeRectangle, plus there is already code that depends on the current version of it. I'm adding new QML based components instead.

SelectionTool

A basic component for selecting a rectangular area. It has 8 handles, 4 of which disappear when the selection area is too small. The selection area can be dragged around. There are no background graphics by default in order to make this component more reusable.

SelectionHandle

A handle that looks like either 3/4 of a circle (corners) or 1/2 of a circle (sides). It would be nice to be able separate the functionality from the graphics when used in SelectionTool, but there's no pressing need for it right now. The current graphics should be fine for a variety of purposes.

SelectionBackground

A dashed outline that should fit in the selection area of SelectionTool.

CropBackground

A tinted rectangular area that should fill the SelectionTool with a cutout in the middle that should fill the selection area. There is also a solid border that should fit the cutout area.

RectangleCutout

A tinted rectangular area with a cutout area in the middle.


The new visuals are like Spectacle.

Screenshot_20210822_230245 Screenshot_20210822_230944

Edited by Noah Davis

Merge request reports