Skip to content

users: Improve rendering of avatar crop

As mentioned in #2514 (closed), the crop corners can be cut by the edge of the widget. Furthermore, I noticed the edges of the crop circle and the corners jitter when adjusting either the top or left edges.

This fixes both those visual issues. First of all the rounding of the paintable to widget coordinates is improved, which gets rid of the edge jitter. Furthermore, the crop corners are now limited to the inside of the crop, so that they cannot be cut by the image edge.

Before
Screencast_from_2023-06-09_00-28-54

After
Screencast_from_2023-06-09_00-30-20

The logic of the crop moving and resizing is also a bit finicky, which is also mentioned in #2514 (closed). I figured to separate the fix for that in a separate MR though.

Edited by Matthijs Velsink

Merge request reports