pop-os / libcosmic

WIP library for COSMIC applications
https://pop-os.github.io/libcosmic/cosmic/
Mozilla Public License 2.0
427 stars 41 forks source link

Border not properly aligned with underlying container #554

Closed peterkrull closed 1 month ago

peterkrull commented 2 months ago

I noticed while working on cosmic-osd/#54 and playing around with the border thickness, that the edge of a container is not always well-aligned with its border. Especially the rounded edge of a container is not aligned with the inner edge of the border. I cranked up the border width to exaggerate this effect:

screenshot-2024-07-31-16-12-14

This is not only an issue when exaggerated like this. It is also noticeable with display scaling turned up on the applets. Excuse the analog screenshot; screenshots with scaling were blurry for some reason. Again, notice how the background is bleeding through the rounded corners, and even on the straight edges.

screenshot-2024-07-31-17-01-00

peterkrull commented 1 month ago

The issue in the first image (fixed with iced/018051e) was related to an incorrect calculation in tiny-skia. I am also not noticing the issue in the second screenshot with wgpu.