Skip to content

Round wallpaper corners

Alice Mikhaylenko requested to merge alicem/nostalgia:wip/exalm/round into master

Well, really a lot more. Currently we scale wallpapers so that their width matches and draw at the top left corner, assuming they match the preview aspect ratio. That's not always true, and if it's larger than preview, it leads to cut off corners at the bottom.

To mitigate this, scale wallpaper so its width or height matches the preview so that the wallpaper is guaranteed to completely fill the preview. Then center it.

Since this requires knowing both dimensions of the preview instead of just width, use both dimensions as cache key as WxH.

Mask corners, similarly to how it's done in HdyWindow. In order not to lose performance too much, only mask corners and draw the rest as is.

Edited by Alice Mikhaylenko

Merge request reports